mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-28 20:09:38 +08:00
Fix switching modes on RISC OS
This commit is contained in:
committed by
Sam Lantinga
parent
418960bb4e
commit
7071efb6a3
@@ -1533,9 +1533,13 @@ bool SDL_SetDisplayModeForDisplay(SDL_VideoDisplay *display, SDL_DisplayMode *mo
|
|||||||
mode = &display->desktop_mode;
|
mode = &display->desktop_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// On RISC OS, it's necessary to switch from the desktop to single-tasking
|
||||||
|
// fullscreen so that it can handle switching back to the desktop correctly.
|
||||||
|
#ifndef SDL_PLATFORM_RISCOS
|
||||||
if (mode == display->current_mode) {
|
if (mode == display->current_mode) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Actually change the display mode
|
// Actually change the display mode
|
||||||
if (_this->SetDisplayMode) {
|
if (_this->SetDisplayMode) {
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ static size_t measure_mode_block(const int *block)
|
|||||||
return blockSize * 4;
|
return blockSize * 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool read_mode_variable(int *block, int var)
|
static int read_mode_variable(int *block, int var)
|
||||||
{
|
{
|
||||||
_kernel_swi_regs regs;
|
_kernel_swi_regs regs;
|
||||||
regs.r[0] = (int)block;
|
regs.r[0] = (int)block;
|
||||||
|
|||||||
Reference in New Issue
Block a user