Bart van Strien  committed 4fede85

Reapply sdl's keyrepeat settings after setWindow

  • Participants
  • Parent commits 7187cf4
  • Branches default

Comments (0)

Files changed (1)

File src/modules/window/sdl/Window.cpp

 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
 	// Set caption.
+	SDL_EnableKeyRepeat(keyrepeatDelay, keyrepeatInterval);
 	// Set GL attributes
 	SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);