- if (settings.useOpenGL)
- sdlemu_init_opengl(surface, mainSurface, 1 /*method*/,
- settings.glFilter /*texture type (linear, nearest)*/,
- 0 /* Automatic bpp selection based upon src */);
-
- // Initialize Joystick support under SDL
-/* if (settings.useJoystick)
- {
- if (SDL_NumJoysticks() <= 0)
- {
- settings.useJoystick = false;
- WriteLog("Video: No joystick(s) or joypad(s) detected on your system. Using keyboard...\n");
- }
- else
- {
- if ((joystick = SDL_JoystickOpen(settings.joyport)) == 0)
- {
- settings.useJoystick = false;
- WriteLog("Video: Unable to open a Joystick on port: %d\n", (int)settings.joyport);
- }
- else
- WriteLog("Video: Using: %s\n", SDL_JoystickName(settings.joyport));
- }
- }//*/
-
- // Set up the scrBuffer
- scrBuffer = (uint32 *)surface->pixels; // Kludge--And shouldn't have to lock since it's a software surface...
-//needed? Dunno. Mebbe an SDL function instead?
-// memset(scrBuffer, 0x00, VIRTUAL_SCREEN_WIDTH * VIRTUAL_SCREEN_HEIGHT * sizeof(uint32));
-
- if (settings.fullscreen)
- SDL_ShowCursor(SDL_DISABLE);
-
-#ifdef TEST_ALPHA_BLENDING
-//Here's some code to test alpha blending...
-//Well whaddya know, it works. :-)
- someAlphaSurface = SDL_CreateRGBSurface(SDL_SWSURFACE, 30, 30, 32,
- MASK_R, MASK_G, MASK_B, MASK_A);
+ // Make the scaled rendering look smoother.
+// SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
+ SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "nearest");
+ SDL_RenderSetLogicalSize(sdlRenderer, VIRTUAL_SCREEN_WIDTH, VIRTUAL_SCREEN_HEIGHT);