New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Map preview doesn't draw all tiles when using SDL2 #30
Comments
Fixed! |
:D I will test this when I can. |
Can confirm that it works. it plays in slowmotion on my raspberry pi though, sound is normal speed but the gameplay is maybe half the speed, not sure if its a memory thing or something specific to my pi, though I have no speed issues with the sdl1 builds on my pi. |
I tested on my linux mint desktop and had no slowdown so it has something to do with the pi. I don't know why as the sdl2 builds before it was fixed didn't have any speed issues. |
|
The following patch fixed the issue for me on an Odroid board, can you try this on RPi? If this works, I'll add a build flag to force SW rendering. diff --git a/src/common/gfx/gfxSDL.cpp b/src/common/gfx/gfxSDL.cpp
index e55f638..81b2c85 100644
--- a/src/common/gfx/gfxSDL.cpp
+++ b/src/common/gfx/gfxSDL.cpp
@@ -114,7 +114,7 @@ void GraphicsSDL::create_game_window(bool fullscreen)
void GraphicsSDL::create_renderer()
{
sdl2_renderer = SDL_CreateRenderer(sdl2_window, -1,
- SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
+ SDL_RENDERER_SOFTWARE | SDL_RENDERER_TARGETTEXTURE);
if (!sdl2_renderer) {
fprintf(stderr, "[gfx] Couldn't create renderer: %s\n", SDL_GetError());
throw E_CREATE_RENDERER; |
I'll give it a test right now and see if it works |
Fixed and running fast. |
As reported here: #6 (comment)
Only happens with SDL2 build; after changing maps, only the background and the breakable blocks get drawn.
The text was updated successfully, but these errors were encountered: