mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 01:45:32 +00:00
video: Use string comparison instead of #ifdefs for driver detection
The dummy driver can be in use on these platforms, so check the actual driver name string. Fixes the automated video tests with the dummy driver on Win32.
This commit is contained in:
parent
a420eb79bb
commit
06dd70bc8b
|
@ -1496,20 +1496,21 @@ static int SDL_UpdateFullscreenMode(SDL_Window *window, SDL_bool fullscreen)
|
||||||
|
|
||||||
/* Generate a mode change event here */
|
/* Generate a mode change event here */
|
||||||
if (resized) {
|
if (resized) {
|
||||||
#if !defined(__ANDROID__) && !defined(__WIN32__)
|
if (SDL_strcmp(_this->name, "Android") != 0 && SDL_strcmp(_this->name, "windows") != 0) {
|
||||||
/* Android may not resize the window to exactly what our fullscreen mode is, especially on
|
/* Android may not resize the window to exactly what our fullscreen mode is, especially on
|
||||||
* windowed Android environments like the Chromebook or Samsung DeX. Given this, we shouldn't
|
* windowed Android environments like the Chromebook or Samsung DeX. Given this, we shouldn't
|
||||||
* use fullscreen_mode.w and fullscreen_mode.h, but rather get our current native size. As such,
|
* use fullscreen_mode.w and fullscreen_mode.h, but rather get our current native size. As such,
|
||||||
* Android's SetWindowFullscreen will generate the window event for us with the proper final size.
|
* Android's SetWindowFullscreen will generate the window event for us with the proper final size.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* This is also unnecessary on Win32 (WIN_SetWindowFullscreen calls SetWindowPos,
|
||||||
|
* WM_WINDOWPOSCHANGED will send SDL_WINDOWEVENT_RESIZED). Also, on Windows with DPI scaling enabled,
|
||||||
|
* we're keeping modes in pixels, but window sizes in dpi-scaled points, so this would be a unit mismatch.
|
||||||
|
*/
|
||||||
|
SDL_SendWindowEvent(other, SDL_WINDOWEVENT_RESIZED,
|
||||||
|
fullscreen_mode.w, fullscreen_mode.h);
|
||||||
|
}
|
||||||
|
|
||||||
/* This is also unnecessary on Win32 (WIN_SetWindowFullscreen calls SetWindowPos,
|
|
||||||
* WM_WINDOWPOSCHANGED will send SDL_WINDOWEVENT_RESIZED). Also, on Windows with DPI scaling enabled,
|
|
||||||
* we're keeping modes in pixels, but window sizes in dpi-scaled points, so this would be a unit mismatch.
|
|
||||||
*/
|
|
||||||
SDL_SendWindowEvent(other, SDL_WINDOWEVENT_RESIZED,
|
|
||||||
fullscreen_mode.w, fullscreen_mode.h);
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
SDL_OnWindowResized(other);
|
SDL_OnWindowResized(other);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue