mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
30 lines
1.5 KiB
Diff
30 lines
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Luke Wilde <lukew@serenityos.org>
|
|
Date: Wed, 13 Apr 2022 17:22:56 +0100
|
|
Subject: [PATCH] Use SDL software renderer with no vsync
|
|
|
|
This makes us use the SDL software renderer with no vsync, as our SDL2 port does not currently support accelerated rendering
|
|
or vsync.
|
|
|
|
- [ ] Local?
|
|
- [ ] Should be merged to upstream?
|
|
- [X] Resolves issue(s) with our side of things
|
|
- [ ] Hack
|
|
---
|
|
src/platform/sdl/sw-sdl2.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/platform/sdl/sw-sdl2.c b/src/platform/sdl/sw-sdl2.c
|
|
index 48afc33..11bd58c 100644
|
|
--- a/src/platform/sdl/sw-sdl2.c
|
|
+++ b/src/platform/sdl/sw-sdl2.c
|
|
@@ -25,7 +25,7 @@ bool mSDLSWInit(struct mSDLRenderer* renderer) {
|
|
renderer->window = SDL_CreateWindow(projectName, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, renderer->viewportWidth, renderer->viewportHeight, SDL_WINDOW_OPENGL | (SDL_WINDOW_FULLSCREEN_DESKTOP * renderer->player.fullscreen));
|
|
SDL_GetWindowSize(renderer->window, &renderer->viewportWidth, &renderer->viewportHeight);
|
|
renderer->player.window = renderer->window;
|
|
- renderer->sdlRenderer = SDL_CreateRenderer(renderer->window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
|
|
+ renderer->sdlRenderer = SDL_CreateRenderer(renderer->window, -1, SDL_RENDERER_SOFTWARE);
|
|
#ifdef COLOR_16_BIT
|
|
#ifdef COLOR_5_6_5
|
|
renderer->sdlTex = SDL_CreateTexture(renderer->sdlRenderer, SDL_PIXELFORMAT_RGB565, SDL_TEXTUREACCESS_STREAMING, width, height);
|