distribution/packages/games/emulators/PPSSPPSDL/patches/002-fullscreen_drm.patch
2023-02-22 06:56:08 -05:00

59 lines
2.1 KiB
Diff

diff -rupN PPSSPPSDL.orig/SDL/SDLMain.cpp PPSSPPSDL/SDL/SDLMain.cpp
--- PPSSPPSDL.orig/SDL/SDLMain.cpp 2022-12-10 09:06:22.351896562 -0500
+++ PPSSPPSDL/SDL/SDLMain.cpp 2022-12-10 09:07:31.488519195 -0500
@@ -460,11 +460,11 @@ void ToggleFullScreenIfFlagSet(SDL_Windo
Uint32 window_flags = SDL_GetWindowFlags(window);
if (g_ToggleFullScreenType == -1) {
- window_flags ^= SDL_WINDOW_FULLSCREEN_DESKTOP;
+ window_flags ^= SDL_WINDOW_FULLSCREEN;
} else if (g_ToggleFullScreenType == 1) {
- window_flags |= SDL_WINDOW_FULLSCREEN_DESKTOP;
+ window_flags |= SDL_WINDOW_FULLSCREEN;
} else {
- window_flags &= ~SDL_WINDOW_FULLSCREEN_DESKTOP;
+ window_flags &= ~SDL_WINDOW_FULLSCREEN;
}
SDL_SetWindowFullscreen(window, window_flags);
}
@@ -570,7 +570,7 @@ int main(int argc, char *argv[]) {
Uint32 mode = 0;
for (int i = 1; i < argc; i++) {
if (!strcmp(argv[i],"--fullscreen")) {
- mode |= SDL_WINDOW_FULLSCREEN_DESKTOP;
+ mode |= SDL_WINDOW_FULLSCREEN;
g_Config.iForceFullScreen = 1;
} else if (set_xres == -2)
set_xres = parseInt(argv[i]);
@@ -643,19 +643,19 @@ int main(int argc, char *argv[]) {
// Force fullscreen if the resolution is too low to run windowed.
if (g_DesktopWidth < 480 * 2 && g_DesktopHeight < 272 * 2) {
- mode |= SDL_WINDOW_FULLSCREEN_DESKTOP;
+ mode |= SDL_WINDOW_FULLSCREEN;
}
// If we're on mobile, don't try for windowed either.
#if defined(MOBILE_DEVICE) && !PPSSPP_PLATFORM(SWITCH)
mode |= SDL_WINDOW_FULLSCREEN;
#elif defined(USING_FBDEV) || PPSSPP_PLATFORM(SWITCH)
- mode |= SDL_WINDOW_FULLSCREEN_DESKTOP;
+ mode |= SDL_WINDOW_FULLSCREEN;
#else
mode |= SDL_WINDOW_RESIZABLE;
#endif
- if (mode & SDL_WINDOW_FULLSCREEN_DESKTOP) {
+ if (mode & SDL_WINDOW_FULLSCREEN) {
pixel_xres = g_DesktopWidth;
pixel_yres = g_DesktopHeight;
if (g_Config.iForceFullScreen == -1)
@@ -726,7 +726,7 @@ int main(int argc, char *argv[]) {
// Use the setting from the config when initing the window.
if (g_Config.UseFullScreen())
- mode |= SDL_WINDOW_FULLSCREEN_DESKTOP;
+ mode |= SDL_WINDOW_FULLSCREEN;
int x = SDL_WINDOWPOS_UNDEFINED_DISPLAY(getDisplayNumber());
int y = SDL_WINDOWPOS_UNDEFINED;