fix(videoout): disable DirectInput joystick enumeration on Windows

This commit is contained in:
Tenith01 2026-10-07 10:07:21 +05:30 committed by Dean Galvin
parent feddf7f4c6
commit e94f12bd17
1 changed files with 3 additions and 0 deletions

View File

@ -259,6 +259,9 @@ VideoOutDriver& VideoOutDriver::Get() {
VideoOutDriver::VideoOutDriver() {
SDL_SetHint(SDL_HINT_WINDOWS_DPI_AWARENESS, "permonitorv2");
#ifdef _WIN32
SDL_SetHintWithPriority(SDL_HINT_DIRECTINPUT_ENABLED, "0", SDL_HINT_DEFAULT);
#endif
if (SDL_InitSubSystem(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER) < 0) {
throw std::runtime_error(std::string("SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: ") + SDL_GetError());
}