mirror of
https://github.com/libsdl-org/SDL
synced 2024-11-20 16:06:10 -07:00
Always Use Next Display Index
Some checks failed
Build (Android) / CMake (push) Has been cancelled
Build (Android) / Android.mk (push) Has been cancelled
Build (C/P Actions) / FreeBSD (push) Has been cancelled
Build (Emscripten) / emscripten (push) Has been cancelled
Build (iOS/tvOS) / iOS (push) Has been cancelled
Build (iOS/tvOS) / tvOS (push) Has been cancelled
Build / Intel Compiler (Ubuntu 20.04) (push) Has been cancelled
Build / Intel oneAPI (Ubuntu 20.04) (push) Has been cancelled
Build / MacOS (autotools) (push) Has been cancelled
Build / Ubuntu 20.04 (autotools) (push) Has been cancelled
Build / Ubuntu 22.04 (autotools) (push) Has been cancelled
Build / MacOS (CMake) (push) Has been cancelled
Build / Windows (clang32) (push) Has been cancelled
Build / Windows (clang64) (push) Has been cancelled
Build / Windows (mingw32) (push) Has been cancelled
Build / Windows (ucrt64) (push) Has been cancelled
Build / Windows (mingw64) (push) Has been cancelled
Build / Ubuntu 20.04 (CMake) (push) Has been cancelled
Build / Ubuntu 22.04 (CMake) (push) Has been cancelled
Build (MSVC) / Windows (ARM) (push) Has been cancelled
Build (MSVC) / Windows (ARM64) (push) Has been cancelled
Build (MSVC) / Windows static VCRT (x86) (push) Has been cancelled
Build (MSVC) / Windows (x86) (push) Has been cancelled
Build (MSVC) / UWP (x64) (push) Has been cancelled
Build (MSVC) / Windows static VCRT (x64) (push) Has been cancelled
Build (MSVC) / Windows (x64) (push) Has been cancelled
Build (MSVC) / Windows (clang-cl x86) (push) Has been cancelled
Build (MSVC) / Windows (clang-cl x64) (push) Has been cancelled
Build (Nintendo 3DS) / n3ds (push) Has been cancelled
Build (Sony Playstation 2) / ps2 (push) Has been cancelled
Build (Sony Playstation Portable) / psp (push) Has been cancelled
Build (RISC OS) / CMake (push) Has been cancelled
Build (RISC OS) / autotools (push) Has been cancelled
Build (Sony Playstation Vita) / GLES (PVR_PSP2 + gl4es4vita) (push) Has been cancelled
Build (Sony Playstation Vita) / GLES (pib) (push) Has been cancelled
Build (OpenWatcom) / OS/2 (push) Has been cancelled
Build (OpenWatcom) / Windows (push) Has been cancelled
Some checks failed
Build (Android) / CMake (push) Has been cancelled
Build (Android) / Android.mk (push) Has been cancelled
Build (C/P Actions) / FreeBSD (push) Has been cancelled
Build (Emscripten) / emscripten (push) Has been cancelled
Build (iOS/tvOS) / iOS (push) Has been cancelled
Build (iOS/tvOS) / tvOS (push) Has been cancelled
Build / Intel Compiler (Ubuntu 20.04) (push) Has been cancelled
Build / Intel oneAPI (Ubuntu 20.04) (push) Has been cancelled
Build / MacOS (autotools) (push) Has been cancelled
Build / Ubuntu 20.04 (autotools) (push) Has been cancelled
Build / Ubuntu 22.04 (autotools) (push) Has been cancelled
Build / MacOS (CMake) (push) Has been cancelled
Build / Windows (clang32) (push) Has been cancelled
Build / Windows (clang64) (push) Has been cancelled
Build / Windows (mingw32) (push) Has been cancelled
Build / Windows (ucrt64) (push) Has been cancelled
Build / Windows (mingw64) (push) Has been cancelled
Build / Ubuntu 20.04 (CMake) (push) Has been cancelled
Build / Ubuntu 22.04 (CMake) (push) Has been cancelled
Build (MSVC) / Windows (ARM) (push) Has been cancelled
Build (MSVC) / Windows (ARM64) (push) Has been cancelled
Build (MSVC) / Windows static VCRT (x86) (push) Has been cancelled
Build (MSVC) / Windows (x86) (push) Has been cancelled
Build (MSVC) / UWP (x64) (push) Has been cancelled
Build (MSVC) / Windows static VCRT (x64) (push) Has been cancelled
Build (MSVC) / Windows (x64) (push) Has been cancelled
Build (MSVC) / Windows (clang-cl x86) (push) Has been cancelled
Build (MSVC) / Windows (clang-cl x64) (push) Has been cancelled
Build (Nintendo 3DS) / n3ds (push) Has been cancelled
Build (Sony Playstation 2) / ps2 (push) Has been cancelled
Build (Sony Playstation Portable) / psp (push) Has been cancelled
Build (RISC OS) / CMake (push) Has been cancelled
Build (RISC OS) / autotools (push) Has been cancelled
Build (Sony Playstation Vita) / GLES (PVR_PSP2 + gl4es4vita) (push) Has been cancelled
Build (Sony Playstation Vita) / GLES (pib) (push) Has been cancelled
Build (OpenWatcom) / OS/2 (push) Has been cancelled
Build (OpenWatcom) / Windows (push) Has been cancelled
WIN_AddDisplay asserted that the returned index is the expected next one in the list. This can be an unexpected number when displays are add and removed in a batch (eg, Remote Desktop disconnect and reconnect). Instead always just make use of the next index, even if it is not the expected next index value. This fixes issue #9105
This commit is contained in:
parent
11ffdd3abc
commit
bee8874629
1 changed files with 1 additions and 2 deletions
|
@ -377,11 +377,10 @@ static void WIN_AddDisplay(_THIS, HMONITOR hMonitor, const MONITORINFOEXW *info,
|
|||
display.driverdata = displaydata;
|
||||
WIN_GetDisplayBounds(_this, &display, &displaydata->bounds);
|
||||
index = SDL_AddVideoDisplay(&display, send_event);
|
||||
SDL_assert(index == *display_index);
|
||||
SDL_free(display.name);
|
||||
|
||||
done:
|
||||
*display_index += 1;
|
||||
*display_index = index + 1;
|
||||
}
|
||||
|
||||
typedef struct _WIN_AddDisplaysData
|
||||
|
|
Loading…
Reference in a new issue