From f81eebfb5fc855bd56d7bce181a565a770d99e1f Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Mon, 28 Jan 2013 00:25:03 +0100 Subject: [PATCH] Reapply sdl's keyrepeat settings after setWindow --- src/modules/window/sdl/Window.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/window/sdl/Window.cpp b/src/modules/window/sdl/Window.cpp index 39e812725..3d4691f13 100644 --- a/src/modules/window/sdl/Window.cpp +++ b/src/modules/window/sdl/Window.cpp @@ -63,6 +63,8 @@ Window::_currentMode::_currentMode() bool Window::setWindow(int width, int height, bool fullscreen, bool vsync, int fsaa) { bool mouseVisible = getMouseVisible(); + int keyrepeatDelay, keyrepeatInterval; + SDL_GetKeyRepeat(&keyrepeatDelay, &keyrepeatInterval); // We need to restart the subsystem for two reasons: // 1) Special case for fullscreen -> windowed. Windows XP did not @@ -87,6 +89,7 @@ bool Window::setWindow(int width, int height, bool fullscreen, bool vsync, int f // Set caption. setWindowTitle(windowTitle); setMouseVisible(mouseVisible); + SDL_EnableKeyRepeat(keyrepeatDelay, keyrepeatInterval); // Set GL attributes SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);