Skip to content
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

[SDL2] function call bottleneck #39

Open
daltomi opened this issue Jul 28, 2023 · 0 comments
Open

[SDL2] function call bottleneck #39

daltomi opened this issue Jul 28, 2023 · 0 comments

Comments

@daltomi
Copy link

daltomi commented Jul 28, 2023

OSDEP_UpdateRect(vga,0,0,vga_an,vga_al);
if(SDL_MUSTLOCK(vga))
SDL_UnlockSurface(vga);
OSDEP_Flip(vga);

The problem is that the function OSDEP_UpdateRect only does internally is call OSDEP_Flip, so hare the function is being called 2 times. See: src/shared/osdep/osd_sdl2.c , branch: master

Maybe in modern computers the speed drop is not noticeable but mine is. Moving the windows or the mouse cursor is noticeable slower.

Proposal: A conditional guard should exist for the SDL2 implementation to only call one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant