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

(GLES) ppsspp is always full screen with SDL2 #11627

Closed
2 tasks done
orbea opened this issue Dec 3, 2018 · 7 comments
Closed
2 tasks done

(GLES) ppsspp is always full screen with SDL2 #11627

orbea opened this issue Dec 3, 2018 · 7 comments
Labels
SDL2 Issue on SDL (or Qt in SDL code) but not all ports.

Comments

@orbea
Copy link
Contributor

orbea commented Dec 3, 2018

What happens?

When using the SDL front end with OpenGL ES 2.0 (-DUSING_GLES2=ON) ppsspp has two issues with full screen support.

  • ppsspp will always start full screen.
  • Toggling the full screen setting in the ui does nothing and ppsspp will remain full screen.

This issue is not present with OpenGL or Vulkan and the SDL front end. Its also not an issue with the Qt front end and OpenGL ES.

What should happen?

The full screen setting should work immediately and without issues while using OpenGL ES 2.0.

What hardware, operating system, and PPSSPP version? On desktop, GPU matters for graphical issues.

OS: Slackware64-current
Linux: 4.19.5
ppsspp: 95ffa15
mesa: https://github.com/mesa3d/mesa/commit/94bfb8bf386b560e8e6095727ed1cf08522a027d
SDL: 2.0.9
vulkan-sdk: 1.1.92.1
GPU: AMD RX Vega 56 (amdgpu + radeonsi)

$ glxinfo | grep Core
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.0.0-devel (git-94bfb8bf38)
@orbea orbea changed the title (GLES) ppsspp always full screen with SDL2 (GLES) ppsspp is always full screen with SDL2 Dec 3, 2018
@unknownbrackets
Copy link
Collaborator

It's intentional currently:

ppsspp/SDL/SDLMain.cpp

Lines 443 to 445 in 57bf9e3

// If we're on mobile, don't try for windowed either.
#if defined(USING_GLES2) || defined(MOBILE_DEVICE)
mode |= SDL_WINDOW_FULLSCREEN;

-[Unknown]

@unknownbrackets unknownbrackets added the SDL2 Issue on SDL (or Qt in SDL code) but not all ports. label Dec 3, 2018
@orbea
Copy link
Contributor Author

orbea commented Dec 3, 2018

I suppose its making the assumption that no one will ever try to use GLES on a desktop. :)

@orbea
Copy link
Contributor Author

orbea commented Dec 3, 2018

This works here, would it be that easy?

diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp
index 6dd6d2242..db786c3f1 100644
--- a/SDL/SDLMain.cpp
+++ b/SDL/SDLMain.cpp
@@ -441,7 +441,7 @@ int main(int argc, char *argv[]) {
        }
 
        // If we're on mobile, don't try for windowed either.
-#if defined(USING_GLES2) || defined(MOBILE_DEVICE)
+#if defined(MOBILE_DEVICE)
     mode |= SDL_WINDOW_FULLSCREEN;
 #else
     mode |= SDL_WINDOW_RESIZABLE;

I am not sure if there are any devices that would be using GLES and toggling full screen would be detrimental that are not defined under MOBILE_DEVICE.

@orbea
Copy link
Contributor Author

orbea commented Dec 3, 2018

I think MOBILE_DEVICE is correctly set for android and IOS so this should be safe there, are there any other platforms to worry about?

@unknownbrackets
Copy link
Collaborator

Not sure. People run PPSSPP on toasters, people on raspberry pi tv boxes might be relying on this for all I know.

Just to say... on any device with OpenGL 4 support, you should prefer OpenGL over GLES. There are some features still that GLES is missing and only work on OpenGL.

-[Unknown]

@orbea
Copy link
Contributor Author

orbea commented Dec 3, 2018

While I agree, I think its useful to have GLES working on desktop linux for three reasons.

  1. Its far preferable than testing on toasters.
  2. It can be handy in the case of investigating graphical bugs.
  3. Some people are using normal linux distros with arm where being able to toggle full screen could be desired and OpenGL may not be available.

@orbea
Copy link
Contributor Author

orbea commented Dec 4, 2018

Further full screen issues with OpenGL ES and SDL are covered in issue #11625.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SDL2 Issue on SDL (or Qt in SDL code) but not all ports.
Projects
None yet
Development

No branches or pull requests

2 participants