mirror of
https://github.com/Maschell/GX2_GUI_Template.git
synced 2024-11-21 15:49:15 +01:00
Fixed logging + the process functions and update the padscore.h
-chnaged the nuspacker downloader to a java one, to be platform independent
This commit is contained in:
parent
e6dc8032c9
commit
98666e61d9
125
GX2_template.cbp
125
GX2_template.cbp
@ -28,121 +28,17 @@
|
||||
<Compiler>
|
||||
<Add option="-Wall" />
|
||||
</Compiler>
|
||||
<Unit filename="build/Application.d" />
|
||||
<Unit filename="build/AsyncDeleter.d" />
|
||||
<Unit filename="build/BufferCircle.d" />
|
||||
<Unit filename="build/CFile.d" />
|
||||
<Unit filename="build/CVideo.d" />
|
||||
<Unit filename="build/ColorShader.d" />
|
||||
<Unit filename="build/DirList.d" />
|
||||
<Unit filename="build/FXAAShader.d" />
|
||||
<Unit filename="build/FreeTypeGX.d" />
|
||||
<Unit filename="build/GameBgImage.d" />
|
||||
<Unit filename="build/GameIcon.d" />
|
||||
<Unit filename="build/GridBackground.d" />
|
||||
<Unit filename="build/GuiButton.d" />
|
||||
<Unit filename="build/GuiCheckBox.d" />
|
||||
<Unit filename="build/GuiDragListener.d" />
|
||||
<Unit filename="build/GuiElement.d" />
|
||||
<Unit filename="build/GuiFrame.d" />
|
||||
<Unit filename="build/GuiImage.d" />
|
||||
<Unit filename="build/GuiImageAsync.d" />
|
||||
<Unit filename="build/GuiImageData.d" />
|
||||
<Unit filename="build/GuiParticleImage.d" />
|
||||
<Unit filename="build/GuiSelectBox.d" />
|
||||
<Unit filename="build/GuiSound.d" />
|
||||
<Unit filename="build/GuiSwitch.d" />
|
||||
<Unit filename="build/GuiText.d" />
|
||||
<Unit filename="build/GuiToggle.d" />
|
||||
<Unit filename="build/GuiTrigger.d" />
|
||||
<Unit filename="build/MainWindow.d" />
|
||||
<Unit filename="build/MainWindowTV.d" />
|
||||
<Unit filename="build/Mp3Decoder.d" />
|
||||
<Unit filename="build/OggDecoder.d" />
|
||||
<Unit filename="build/Resources.d" />
|
||||
<Unit filename="build/Scrollbar.d" />
|
||||
<Unit filename="build/Shader3D.d" />
|
||||
<Unit filename="build/ShaderFractalColor.d" />
|
||||
<Unit filename="build/SoundDecoder.d" />
|
||||
<Unit filename="build/SoundHandler.d" />
|
||||
<Unit filename="build/StringTools.d" />
|
||||
<Unit filename="build/Texture2DShader.d" />
|
||||
<Unit filename="build/WavDecoder.d" />
|
||||
<Unit filename="build/acp_functions.d" />
|
||||
<Unit filename="build/aoc_functions.d" />
|
||||
<Unit filename="build/ax_functions.d" />
|
||||
<Unit filename="build/curl_functions.d" />
|
||||
<Unit filename="build/entry.d" />
|
||||
<Unit filename="build/exception_handler.d" />
|
||||
<Unit filename="build/fs_functions.d" />
|
||||
<Unit filename="build/fs_utils.d" />
|
||||
<Unit filename="build/gx2_functions.d" />
|
||||
<Unit filename="build/logger.d" />
|
||||
<Unit filename="build/main.d" />
|
||||
<Unit filename="build/memory.d" />
|
||||
<Unit filename="build/os_functions.d" />
|
||||
<Unit filename="build/padscore_functions.d" />
|
||||
<Unit filename="build/sd_fat_devoptab.d" />
|
||||
<Unit filename="build/socket_functions.d" />
|
||||
<Unit filename="build/sys_functions.d" />
|
||||
<Unit filename="build/syshid_functions.d" />
|
||||
<Unit filename="build/vpad_functions.d" />
|
||||
<Unit filename="src/Application.cpp" />
|
||||
<Unit filename="src/Application.h" />
|
||||
<Unit filename="src/common/common.h" />
|
||||
<Unit filename="src/common/gx2_ext.h" />
|
||||
<Unit filename="src/common/os_defs.h" />
|
||||
<Unit filename="src/common/types.h" />
|
||||
<Unit filename="src/dynamic_libs/acp_functions.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/dynamic_libs/acp_functions.h" />
|
||||
<Unit filename="src/dynamic_libs/aoc_functions.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/dynamic_libs/aoc_functions.h" />
|
||||
<Unit filename="src/dynamic_libs/ax_functions.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/dynamic_libs/ax_functions.h" />
|
||||
<Unit filename="src/dynamic_libs/curl_functions.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/dynamic_libs/curl_functions.h" />
|
||||
<Unit filename="src/dynamic_libs/fs_defs.h" />
|
||||
<Unit filename="src/dynamic_libs/fs_functions.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/dynamic_libs/fs_functions.h" />
|
||||
<Unit filename="src/dynamic_libs/gx2_functions.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/dynamic_libs/gx2_functions.h" />
|
||||
<Unit filename="src/dynamic_libs/gx2_types.h" />
|
||||
<Unit filename="src/dynamic_libs/os_functions.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/dynamic_libs/os_functions.h" />
|
||||
<Unit filename="src/dynamic_libs/os_types.h" />
|
||||
<Unit filename="src/dynamic_libs/exports.h" />
|
||||
<Unit filename="src/dynamic_libs/padscore_functions.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/dynamic_libs/padscore_functions.h" />
|
||||
<Unit filename="src/dynamic_libs/socket_functions.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/dynamic_libs/socket_functions.h" />
|
||||
<Unit filename="src/dynamic_libs/sys_functions.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/dynamic_libs/sys_functions.h" />
|
||||
<Unit filename="src/dynamic_libs/syshid_functions.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/dynamic_libs/syshid_functions.h" />
|
||||
<Unit filename="src/dynamic_libs/vpad_functions.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/dynamic_libs/vpad_functions.h" />
|
||||
<Unit filename="src/entry.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
@ -154,10 +50,6 @@
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/fs/fs_utils.h" />
|
||||
<Unit filename="src/fs/sd_fat_devoptab.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/fs/sd_fat_devoptab.h" />
|
||||
<Unit filename="src/gui/FreeTypeGX.cpp" />
|
||||
<Unit filename="src/gui/FreeTypeGX.h" />
|
||||
<Unit filename="src/gui/GameBgImage.cpp" />
|
||||
@ -205,16 +97,6 @@
|
||||
<Unit filename="src/gui/VPadController.h" />
|
||||
<Unit filename="src/gui/WPadController.h" />
|
||||
<Unit filename="src/gui/sigslot.h" />
|
||||
<Unit filename="src/kernel/kernel_functions.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/kernel/kernel_functions.h" />
|
||||
<Unit filename="src/kernel/kernel_hooks.S" />
|
||||
<Unit filename="src/kernel/syscalls.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/kernel/syscalls.h" />
|
||||
<Unit filename="src/kernel/syscalls_asm.S" />
|
||||
<Unit filename="src/main.cpp" />
|
||||
<Unit filename="src/main.h" />
|
||||
<Unit filename="src/menu/MainWindow.cpp" />
|
||||
@ -255,6 +137,9 @@
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/utils/logger.h" />
|
||||
<Unit filename="src/utils/utils.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/utils/utils.h" />
|
||||
<Unit filename="src/video/CVideo.cpp" />
|
||||
<Unit filename="src/video/CVideo.h" />
|
||||
|
2
Makefile
2
Makefile
@ -160,7 +160,7 @@ install_channel: $(BUILD) NUSPacker.jar encryptKeyWith
|
||||
java -jar NUSPacker.jar -in "channel" -out "install_channel"
|
||||
|
||||
NUSPacker.jar:
|
||||
wget https://bitbucket.org/timogus/nuspacker/downloads/NUSPacker.jar
|
||||
java -jar downloader.jar https://bitbucket.org/timogus/nuspacker/downloads/NUSPacker.jar
|
||||
|
||||
encryptKeyWith:
|
||||
@echo "Missing common key file \"encryptKeyWith\"! Insert the common key as string into \"encryptKeyWith\" file in the HBL Makefile path!"
|
||||
|
BIN
downloader.jar
Normal file
BIN
downloader.jar
Normal file
Binary file not shown.
@ -28,7 +28,17 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "common/types.h"
|
||||
extern u32 padscore_handle;
|
||||
|
||||
#define WPAD_EXT_CORE 0
|
||||
#define WPAD_EXT_NUNCHUK 1
|
||||
#define WPAD_EXT_CLASSIC 2
|
||||
#define WPAD_EXT_MPLUS 5
|
||||
#define WPAD_EXT_MPLUS_NUNCHUK 6
|
||||
#define WPAD_EXT_MPLUS_CLASSIC 7
|
||||
#define WPAD_EXT_PRO_CONTROLLER 31
|
||||
|
||||
#define WPAD_FMT_PRO_CONTROLLER 22
|
||||
|
||||
#define WPAD_BUTTON_LEFT 0x0001
|
||||
#define WPAD_BUTTON_RIGHT 0x0002
|
||||
@ -60,8 +70,34 @@ extern "C" {
|
||||
#define WPAD_CLASSIC_BUTTON_DOWN 0x4000
|
||||
#define WPAD_CLASSIC_BUTTON_RIGHT 0x8000
|
||||
|
||||
void InitPadScoreFunctionPointers(void);
|
||||
#define WPAD_PRO_BUTTON_UP 0x00000001
|
||||
#define WPAD_PRO_BUTTON_LEFT 0x00000002
|
||||
#define WPAD_PRO_TRIGGER_ZR 0x00000004
|
||||
#define WPAD_PRO_BUTTON_X 0x00000008
|
||||
#define WPAD_PRO_BUTTON_A 0x00000010
|
||||
#define WPAD_PRO_BUTTON_Y 0x00000020
|
||||
#define WPAD_PRO_BUTTON_B 0x00000040
|
||||
#define WPAD_PRO_TRIGGER_ZL 0x00000080
|
||||
#define WPAD_PRO_RESERVED 0x00000100
|
||||
#define WPAD_PRO_TRIGGER_R 0x00000200
|
||||
#define WPAD_PRO_BUTTON_PLUS 0x00000400
|
||||
#define WPAD_PRO_BUTTON_HOME 0x00000800
|
||||
#define WPAD_PRO_BUTTON_MINUS 0x00001000
|
||||
#define WPAD_PRO_TRIGGER_L 0x00002000
|
||||
#define WPAD_PRO_BUTTON_DOWN 0x00004000
|
||||
#define WPAD_PRO_BUTTON_RIGHT 0x00008000
|
||||
#define WPAD_PRO_BUTTON_STICK_R 0x00010000
|
||||
#define WPAD_PRO_BUTTON_STICK_L 0x00020000
|
||||
|
||||
#define WPAD_PRO_STICK_L_EMULATION_UP 0x00200000
|
||||
#define WPAD_PRO_STICK_L_EMULATION_DOWN 0x00100000
|
||||
#define WPAD_PRO_STICK_L_EMULATION_LEFT 0x00040000
|
||||
#define WPAD_PRO_STICK_L_EMULATION_RIGHT 0x00080000
|
||||
|
||||
#define WPAD_PRO_STICK_R_EMULATION_UP 0x02000000
|
||||
#define WPAD_PRO_STICK_R_EMULATION_DOWN 0x01000000
|
||||
#define WPAD_PRO_STICK_R_EMULATION_LEFT 0x00400000
|
||||
#define WPAD_PRO_STICK_R_EMULATION_RIGHT 0x00800000
|
||||
|
||||
typedef struct _KPADData
|
||||
{
|
||||
@ -78,7 +114,7 @@ typedef struct _KPADData
|
||||
u8 device_type;
|
||||
u8 wpad_error;
|
||||
u8 pos_valid;
|
||||
u8 unused_4[1];
|
||||
u8 format;
|
||||
|
||||
union
|
||||
{
|
||||
@ -101,19 +137,56 @@ typedef struct _KPADData
|
||||
f32 rtrigger;
|
||||
} classic;
|
||||
|
||||
struct
|
||||
{
|
||||
u32 btns_h;
|
||||
u32 btns_d;
|
||||
u32 btns_r;
|
||||
f32 lstick_x;
|
||||
f32 lstick_y;
|
||||
f32 rstick_x;
|
||||
f32 rstick_y;
|
||||
int charging;
|
||||
int wired;
|
||||
} pro;
|
||||
|
||||
u32 unused_6[20];
|
||||
};
|
||||
u32 unused_7[16];
|
||||
} KPADData;
|
||||
|
||||
typedef struct WPADReadData_ {
|
||||
u8 unknown[40];
|
||||
u8 dev;
|
||||
u8 err;
|
||||
u8 unknown1[2];
|
||||
u32 buttons;
|
||||
s16 l_stick_x;
|
||||
s16 l_stick_y;
|
||||
s16 r_stick_x;
|
||||
s16 r_stick_y;
|
||||
u8 unknown2[8];
|
||||
u8 fmt;
|
||||
}WPADReadData;
|
||||
|
||||
typedef WPADReadData KPADUnifiedWpadData;
|
||||
|
||||
void InitPadScoreFunctionPointers(void);
|
||||
void InitAcquirePadScore(void);
|
||||
|
||||
typedef void (* wpad_extension_callback_t)(s32 chan, s32 status);
|
||||
typedef void (* wpad_connect_callback_t)(s32 chan, s32 status);
|
||||
|
||||
extern void (* KPADInit)(void);
|
||||
extern void (* WPADInit)(void);
|
||||
extern s32 (* WPADProbe)(s32 chan, u32 * pad_type);
|
||||
extern s32 (* WPADSetDataFormat)(s32 chan, s32 format);
|
||||
extern void (* WPADEnableURCC)(s32 enable);
|
||||
extern void (* WPADRead)(s32 chan, void * data);
|
||||
extern s32 (* KPADRead)(s32 chan, void * data, u32 size);
|
||||
extern s32 (* KPADReadEx)(s32 chan, KPADData * data, u32 size, s32 *error);
|
||||
extern void (*WPADSetAutoSleepTime)(u8 time);
|
||||
extern void (*WPADDisconnect)( s32 chan );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -230,6 +230,21 @@ void GuiFrame::update(GuiController * c)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GuiFrame::process(){
|
||||
if(isStateSet(STATE_DISABLED) && parentElement)
|
||||
return;
|
||||
|
||||
GuiElement::process();
|
||||
|
||||
//! update appended items next frame
|
||||
u32 size = elements.size();
|
||||
|
||||
for (u32 i = 0; i < size && i < elements.size(); ++i){
|
||||
elements[i]->process();
|
||||
}
|
||||
}
|
||||
|
||||
void GuiFrame::updateElementList(void)
|
||||
{
|
||||
if(listChangeQueue.empty() == false)
|
||||
|
@ -74,6 +74,7 @@ class GuiFrame : public GuiElement
|
||||
//!Allows the GuiFrame and all elements to respond to the input data specified
|
||||
//!\param t Pointer to a GuiTrigger, containing the current input data from PAD/WPAD
|
||||
void update(GuiController * t);
|
||||
void process();
|
||||
//!virtual Close Window - this will put the object on the delete queue in MainWindow
|
||||
virtual void close();
|
||||
//!virtual show window function
|
||||
|
@ -15,7 +15,7 @@ extern "C" int Menu_Main(void){
|
||||
//!*******************************************************************
|
||||
//! do OS (for acquire) and sockets first so we got logging
|
||||
InitPadScoreFunctionPointers();
|
||||
|
||||
socket_lib_init();
|
||||
log_init("192.168.0.181");
|
||||
|
||||
//Otherwise apply the patches!!!
|
||||
@ -33,7 +33,7 @@ extern "C" int Menu_Main(void){
|
||||
Application::destroyInstance();
|
||||
memoryRelease();
|
||||
|
||||
log_print("Going back to the Homebrew launcher\n");
|
||||
log_print("Leaving the application\n");
|
||||
log_deinit();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
Loading…
Reference in New Issue
Block a user