PSP2: Actually load screen mode setting
Jeffrey Pfau jeffrey@endrift.com
Tue, 02 Aug 2016 22:26:08 -0700
4 files changed,
17 insertions(+),
8 deletions(-)
M
CHANGES
→
CHANGES
@@ -14,6 +14,7 @@ - PSP2: Fix VSync
- ARM7: Fix decoding of Thumb ADD (variants 5 and 6) - GBA Serialize: Savestates now properly store prefetch - PSP2: Fix accelerometer range + - PSP2: Actually load screen mode setting Misc: - 3DS: Use blip_add_delta_fast for a small speed improvement - OpenGL: Log shader compilation failure
M
src/platform/psp2/main.c
→
src/platform/psp2/main.c
@@ -155,7 +155,7 @@ .prepareForFrame = mPSP2PrepareForFrame,
.drawFrame = mPSP2Draw, .drawScreenshot = mPSP2DrawScreenshot, .paused = 0, - .unpaused = 0, + .unpaused = mPSP2Unpaused, .incrementScreenMode = mPSP2IncrementScreenMode, .pollGameInput = mPSP2PollInput };
M
src/platform/psp2/psp2-context.c
→
src/platform/psp2/psp2-context.c
@@ -174,6 +174,11 @@ rotation.d.readGyroZ = _readGyroZ;
runner->core->setRotation(runner->core, &rotation.d); backdrop = vita2d_load_PNG_buffer(_binary_backdrop_png_start); + + unsigned mode; + if (mCoreConfigGetUIntValue(&runner->core->config, "screenMode", &mode) && mode < SM_MAX) { + screenMode = mode; + } } void mPSP2LoadROM(struct mGUIRunner* runner) {@@ -249,6 +254,13 @@ }
scePowerSetArmClockFrequency(80); } +void mPSP2Unpaused(struct mGUIRunner* runner) { + unsigned mode; + if (mCoreConfigGetUIntValue(&runner->core->config, "screenMode", &mode) && mode != screenMode) { + screenMode = mode; + } +} + void mPSP2Teardown(struct mGUIRunner* runner) { vita2d_free_texture(tex); vita2d_free_texture(screenshot);@@ -293,13 +305,8 @@ }
} void mPSP2IncrementScreenMode(struct mGUIRunner* runner) { - unsigned mode; - if (mCoreConfigGetUIntValue(&runner->core->config, "screenMode", &mode) && mode != screenMode) { - screenMode = mode; - } else { - screenMode = (screenMode + 1) % SM_MAX; - mCoreConfigSetUIntValue(&runner->core->config, "screenMode", screenMode); - } + screenMode = (screenMode + 1) % SM_MAX; + mCoreConfigSetUIntValue(&runner->core->config, "screenMode", screenMode); } __attribute__((noreturn, weak)) void __assert_func(const char* file, int line, const char* func, const char* expr) {
M
src/platform/psp2/psp2-context.h
→
src/platform/psp2/psp2-context.h
@@ -16,6 +16,7 @@
void mPSP2LoadROM(struct mGUIRunner* runner); void mPSP2UnloadROM(struct mGUIRunner* runner); void mPSP2PrepareForFrame(struct mGUIRunner* runner); +void mPSP2Unpaused(struct mGUIRunner* runner); void mPSP2Draw(struct mGUIRunner* runner, bool faded); void mPSP2DrawScreenshot(struct mGUIRunner* runner, const uint32_t* pixels, bool faded); void mPSP2IncrementScreenMode(struct mGUIRunner* runner);