|
@@ -1166,7 +1166,8 @@ static void keyboard_handle_enter(void *data, struct wl_keyboard *keyboard,
|
|
|
const SDL_Scancode scancode = Wayland_get_scancode_from_key(input, *key + 8);
|
|
|
|
|
|
if (scancode != SDL_SCANCODE_UNKNOWN) {
|
|
|
- for (uint32_t i = 0; i < SDL_arraysize(mod_scancodes); ++i) {
|
|
|
+ uint32_t i;
|
|
|
+ for (i = 0; i < SDL_arraysize(mod_scancodes); ++i) {
|
|
|
if (mod_scancodes[i] == scancode) {
|
|
|
SDL_SendKeyboardKey(SDL_PRESSED, scancode);
|
|
|
break;
|
|
@@ -1814,7 +1815,8 @@ static void data_device_handle_drop(void *data, struct wl_data_device *wl_data_d
|
|
|
char **paths = SDL_DBus_DocumentsPortalRetrieveFiles(buffer, &path_count);
|
|
|
/* If dropped files contain a directory the list is empty */
|
|
|
if (paths && path_count > 0) {
|
|
|
- for (int i = 0; i < path_count; i++) {
|
|
|
+ int i;
|
|
|
+ for (i = 0; i < path_count; i++) {
|
|
|
SDL_SendDropFile(data_device->dnd_window, paths[i]);
|
|
|
}
|
|
|
dbus->free_string_array(paths);
|