mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-02-26 01:36:52 +00:00
Fixed interpreting SDL_KMSDRM_DEVICE_INDEX="" as index 0
This commit is contained in:
parent
36d456797b
commit
613ce7850e
|
@ -80,7 +80,7 @@ get_driindex(void)
|
||||||
const char *hint;
|
const char *hint;
|
||||||
|
|
||||||
hint = SDL_GetHint(SDL_HINT_KMSDRM_DEVICE_INDEX);
|
hint = SDL_GetHint(SDL_HINT_KMSDRM_DEVICE_INDEX);
|
||||||
if (hint) {
|
if (hint && *hint) {
|
||||||
const int idx = SDL_atoi(hint);
|
const int idx = SDL_atoi(hint);
|
||||||
if (idx >= 0) {
|
if (idx >= 0) {
|
||||||
return idx; /* we'll take the user's request here. */
|
return idx; /* we'll take the user's request here. */
|
||||||
|
|
Loading…
Reference in a new issue