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

Fix SDL2 GFX Suspend Screensaver Warning #15846

Conversation

RobLoach
Copy link
Member

When building RetroArch and X11 is available, it will skip using sdl2_gfx_suspend_screensaver(), resulting in a warning. This change cleans up the declaration code, and makes the macro condition within the function itself, so that we no longer get the warning when building.

gfx/drivers/sdl2_gfx.c:542:13: warning: ‘sdl2_gfx_suspend_screensaver’ defined but not used [-Wunused-function]
  542 | static bool sdl2_gfx_suspend_screensaver(void *data, bool enable) { return false; }
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

When building RetroArch and X11 is available, it will skip using `sdl2_gfx_suspend_screensaver()`, resulting in a warning. This change cleans up the declaration code, and makes the macro condition within the function itself, so that we no longer get the warning when building.
@LibretroAdmin
Copy link
Contributor

This should achieve the same purpose I hope -
466e82f

I'd rather not deal with useless wrapper functions.

@RobLoach
Copy link
Member Author

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants