add mirror mode toggle

This commit is contained in:
TakaRikka
2026-04-02 19:08:30 -07:00
parent 5a00183170
commit 08268eb015
5 changed files with 61 additions and 29 deletions
+27 -2
View File
@@ -4,6 +4,8 @@
#include "JSystem/JUtility/JUTGamePad.h"
#include "SSystem/SComponent/c_API_controller_pad.h"
#include "dusk/imgui/ImGuiMenuEnhancements.hpp"
// Controller Ports 1 - 4
enum { PAD_1, PAD_2, PAD_3, PAD_4 };
@@ -52,8 +54,31 @@ public:
static f32 getStickX3D(u32 pad) { return getCpadInfo(pad).mMainStickPosX; }
static f32 getStickValue(u32 pad) { return getCpadInfo(pad).mMainStickValue; }
static s16 getStickAngle(u32 pad) { return getCpadInfo(pad).mMainStickAngle; }
static s16 getStickAngle3D(u32 pad) { return getCpadInfo(pad).mMainStickAngle; }
static f32 getSubStickX3D(u32 pad) { return getCpadInfo(pad).mCStickPosX; }
static s16 getStickAngle3D(u32 pad) {
#if TARGET_PC
if (dusk::ImGuiMenuEnhancements::m_enhancements.mirrorMode) {
return -getCpadInfo(pad).mMainStickAngle;
} else {
return getCpadInfo(pad).mMainStickAngle;
}
#else
return getCpadInfo(pad).mMainStickAngle;
#endif
}
static f32 getSubStickX3D(u32 pad) {
#if TARGET_PC
if (dusk::ImGuiMenuEnhancements::m_enhancements.mirrorMode) {
return -getCpadInfo(pad).mCStickPosX;
} else {
return getCpadInfo(pad).mCStickPosX;
}
#else
return getCpadInfo(pad).mCStickPosX;
#endif
}
static f32 getSubStickX(u32 pad) { return getCpadInfo(pad).mCStickPosX; }
static f32 getSubStickY(u32 pad) { return getCpadInfo(pad).mCStickPosY; }
static f32 getSubStickValue(u32 pad) { return getCpadInfo(pad).mCStickValue; }
+6 -3
View File
@@ -312,6 +312,12 @@ public:
static JKRHeap* m_heap;
#endif
#if PLATFORM_WII || PLATFORM_SHIELD || TARGET_PC
static ResTIMG* m_fullFrameBufferTimg;
static void* m_fullFrameBufferTex;
static TGXTexObj m_fullFrameBufferTexObj;
#endif
#if PLATFORM_WII || PLATFORM_SHIELD
static void resetDimming();
@@ -326,9 +332,6 @@ public:
#if WIDESCREEN_SUPPORT
static u8 mWide;
static u8 mWideZoom;
static ResTIMG* m_fullFrameBufferTimg;
static void* m_fullFrameBufferTex;
static TGXTexObj m_fullFrameBufferTexObj;
static f32 m_aspect;
static f32 m_scale;