mirror of https://github.com/mgba-emu/mgba.git
PSP2: Actually load screen mode setting
This commit is contained in:
parent
15477688d7
commit
6e47d402c8
1
CHANGES
1
CHANGES
|
@ -14,6 +14,7 @@ Bugfixes:
|
||||||
- ARM7: Fix decoding of Thumb ADD (variants 5 and 6)
|
- ARM7: Fix decoding of Thumb ADD (variants 5 and 6)
|
||||||
- GBA Serialize: Savestates now properly store prefetch
|
- GBA Serialize: Savestates now properly store prefetch
|
||||||
- PSP2: Fix accelerometer range
|
- PSP2: Fix accelerometer range
|
||||||
|
- PSP2: Actually load screen mode setting
|
||||||
Misc:
|
Misc:
|
||||||
- 3DS: Use blip_add_delta_fast for a small speed improvement
|
- 3DS: Use blip_add_delta_fast for a small speed improvement
|
||||||
- OpenGL: Log shader compilation failure
|
- OpenGL: Log shader compilation failure
|
||||||
|
|
|
@ -155,7 +155,7 @@ int main() {
|
||||||
.drawFrame = mPSP2Draw,
|
.drawFrame = mPSP2Draw,
|
||||||
.drawScreenshot = mPSP2DrawScreenshot,
|
.drawScreenshot = mPSP2DrawScreenshot,
|
||||||
.paused = 0,
|
.paused = 0,
|
||||||
.unpaused = 0,
|
.unpaused = mPSP2Unpaused,
|
||||||
.incrementScreenMode = mPSP2IncrementScreenMode,
|
.incrementScreenMode = mPSP2IncrementScreenMode,
|
||||||
.pollGameInput = mPSP2PollInput
|
.pollGameInput = mPSP2PollInput
|
||||||
};
|
};
|
||||||
|
|
|
@ -174,6 +174,11 @@ void mPSP2Setup(struct mGUIRunner* runner) {
|
||||||
runner->core->setRotation(runner->core, &rotation.d);
|
runner->core->setRotation(runner->core, &rotation.d);
|
||||||
|
|
||||||
backdrop = vita2d_load_PNG_buffer(_binary_backdrop_png_start);
|
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) {
|
void mPSP2LoadROM(struct mGUIRunner* runner) {
|
||||||
|
@ -249,6 +254,13 @@ void mPSP2UnloadROM(struct mGUIRunner* runner) {
|
||||||
scePowerSetArmClockFrequency(80);
|
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) {
|
void mPSP2Teardown(struct mGUIRunner* runner) {
|
||||||
vita2d_free_texture(tex);
|
vita2d_free_texture(tex);
|
||||||
vita2d_free_texture(screenshot);
|
vita2d_free_texture(screenshot);
|
||||||
|
@ -293,14 +305,9 @@ void mPSP2DrawScreenshot(struct mGUIRunner* runner, const uint32_t* pixels, bool
|
||||||
}
|
}
|
||||||
|
|
||||||
void mPSP2IncrementScreenMode(struct mGUIRunner* runner) {
|
void mPSP2IncrementScreenMode(struct mGUIRunner* runner) {
|
||||||
unsigned mode;
|
|
||||||
if (mCoreConfigGetUIntValue(&runner->core->config, "screenMode", &mode) && mode != screenMode) {
|
|
||||||
screenMode = mode;
|
|
||||||
} else {
|
|
||||||
screenMode = (screenMode + 1) % SM_MAX;
|
screenMode = (screenMode + 1) % SM_MAX;
|
||||||
mCoreConfigSetUIntValue(&runner->core->config, "screenMode", screenMode);
|
mCoreConfigSetUIntValue(&runner->core->config, "screenMode", screenMode);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
__attribute__((noreturn, weak)) void __assert_func(const char* file, int line, const char* func, const char* expr) {
|
__attribute__((noreturn, weak)) void __assert_func(const char* file, int line, const char* func, const char* expr) {
|
||||||
printf("ASSERT FAILED: %s in %s at %s:%i\n", expr, func, file, line);
|
printf("ASSERT FAILED: %s in %s at %s:%i\n", expr, func, file, line);
|
||||||
|
|
|
@ -16,6 +16,7 @@ void mPSP2Teardown(struct mGUIRunner* runner);
|
||||||
void mPSP2LoadROM(struct mGUIRunner* runner);
|
void mPSP2LoadROM(struct mGUIRunner* runner);
|
||||||
void mPSP2UnloadROM(struct mGUIRunner* runner);
|
void mPSP2UnloadROM(struct mGUIRunner* runner);
|
||||||
void mPSP2PrepareForFrame(struct mGUIRunner* runner);
|
void mPSP2PrepareForFrame(struct mGUIRunner* runner);
|
||||||
|
void mPSP2Unpaused(struct mGUIRunner* runner);
|
||||||
void mPSP2Draw(struct mGUIRunner* runner, bool faded);
|
void mPSP2Draw(struct mGUIRunner* runner, bool faded);
|
||||||
void mPSP2DrawScreenshot(struct mGUIRunner* runner, const uint32_t* pixels, bool faded);
|
void mPSP2DrawScreenshot(struct mGUIRunner* runner, const uint32_t* pixels, bool faded);
|
||||||
void mPSP2IncrementScreenMode(struct mGUIRunner* runner);
|
void mPSP2IncrementScreenMode(struct mGUIRunner* runner);
|
||||||
|
|
Loading…
Reference in New Issue