You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: 2.0.4 Reported for operating system, platform: Linux, ARM
Comments on the original bug report:
On 2016-05-31 16:10:39 +0000, Logan McNaughton wrote:
in RPI_CreateWindow (video/raspberry/SDL_rpivideo.c), it does this:
/* Windows have one size for now */
window->w = display->desktop_mode.w;
window->h = display->desktop_mode.h;
It overwrites the SDL window size with the size of the display. Basically window mode is disabled.
I'll give you an example of why this is not helpful:
My rpi runs at a resolution of 640x480. If I run mupen64plus (n64 emulator) with --windowed --resolution 320x240, it just uses 1/4 of the screen, because SDL is overwriting the resolution back to 640x480, and mupen64plus is rendering at 320x240.
This uses dispmanx to stretch the image. So if your display is 640x480, and you create an SDL Window that is 320x240, it will stretch that 320x240 image to fit 640x480. This is useful. Since the rpi doesn't really support windows, this is more useful than overwriting the window size like it does now.
On 2016-05-31 16:13:53 +0000, Logan McNaughton wrote:
Created attachment 2474
Patch to fix problem
On 2016-06-01 14:23:12 +0000, Simon Hug wrote:
Why settle for one option if we could have both? The SDL hint system offers a great way to solve this issue.
Shouldn't mupen64plus check if the window size isn't what was requested? SDL makes no guarantees here. The application should have options on how to scale its contents.
On 2016-06-01 14:53:52 +0000, Logan McNaughton wrote:
(In reply to Simon Hug from comment # 2)
Why settle for one option if we could have both? The SDL hint system offers
a great way to solve this issue.
Shouldn't mupen64plus check if the window size isn't what was requested? SDL
makes no guarantees here. The application should have options on how to
scale its contents.
Even if mupen64plus realized that the window size is wrong, what is it going to do about it? I'm sure mupen64plus could scale the contents, but that requires work from the GPU, this patch accomplishes the scaling at basically no cost to the GPU.
Anyway, I don't know anything about SDL hints, but the way it works right now is not very useful. If someone requests a window, it just makes it full screen and sends it back to the user, at least with this patch they get the resolution they wanted.
On 2016-06-01 18:43:26 +0000, Simon Hug wrote:
Perhaps. But forcing a stretch to fullscreen with whatever filter dispmanx is using might not be useful to someone else. Especially if the aspect ratios don't match.
Have a look at the SDL_hints.h header. These hints can be used to change the behavior of SDL with a change of an environment variable. You can add another one for this case and use SDL_GetHint in the RPI_CreateWindow function to decide if SDL should do it the current or your way.
On 2016-06-01 19:42:33 +0000, Logan McNaughton wrote:
Created attachment 2477
Patch to SDL_hints.h
On 2016-06-01 19:43:01 +0000, Logan McNaughton wrote:
Created attachment 2478
New rpivideo.c patch with SDL hint
On 2016-06-01 19:43:23 +0000, Logan McNaughton wrote:
Created attachment 2479
New rpivideo patch with SDL hint
On 2016-06-01 19:44:37 +0000, Logan McNaughton wrote:
Fair enough, I've added patches for SDL_hints.h and SDL_rpivideo.c to use the hint SDL_RPI_STRETCH_WINDOW.
Tested and working on my Raspberry Pi 3 in both modes.
On 2016-06-02 13:01:55 +0000, Simon Hug wrote:
I tested it as well and noticed that the stretching breaks the position of the software cursor which the SDL Raspberry Pi driver puts on screen. It obviously doesn't know about the scaling.
On 2016-06-02 14:16:04 +0000, Logan McNaughton wrote:
hm ok I don't know about that, I don't use a cursor, I am using a fullscreen OpenGL application controlled by a joypad.
On 2016-06-06 20:58:34 +0000, Philipp Wiesemann wrote:
The hint name should start with "SDL_HINT_" (e.g. SDL_HINT_RPI_STRETCH_WINDOW).
On 2016-06-06 21:32:45 +0000, Logan McNaughton wrote:
Would this patch be accepted if I changed the hint name? I don't own a mouse to test the cursor functionality.
On 2016-06-07 14:24:13 +0000, Logan McNaughton wrote:
Created attachment 2482
Patch to SDL_hints.h
On 2016-06-07 14:24:35 +0000, Logan McNaughton wrote:
Created attachment 2483
New rpivideo patch with SDL hint
On 2016-07-02 21:43:27 +0000, Philipp Wiesemann wrote:
The value of the hint should not contain the "SDL_HINT_" (as documented at the top of SDL_hints.h :).
On 2016-07-07 19:05:06 +0000, Logan McNaughton wrote:
Created attachment 2528
Update patch
This is a more robust version of this patch written by gizmo98 on GitHub. I have attached the patch as pull from GitHub, you can see the discussion that went along with this here:
I can provide an updated patch including everything if needed - if not we will just continue to maintain it our own fork - which we need anyway as we need to have this revert spurious/SDL-mirror@b02fe99 as ps3 controllers are broken without it in Emulation station and other sdl2 apps.
I've been using this patch in my game and it works well. It's been included in RetroPie for 2+ years now. Would it be possible to get an updated patch and include this in SDL? Thanks everyone for working on this.
The text was updated successfully, but these errors were encountered:
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Patch to fix problem (sdl_patch.patch.txt, text/plain, 2016-05-31 16:13:53 +0000, 826 bytes)Patch to SDL_hints.h (SDL_hints.h.patch, text/plain, 2016-06-01 19:42:33 +0000, 571 bytes)New rpivideo.c patch with SDL hint (rpivideo.c.patch, text/plain, 2016-06-01 19:43:01 +0000, 1472 bytes)New rpivideo patch with SDL hint (rpivideo.c.patch, text/plain, 2016-06-01 19:43:23 +0000, 1472 bytes)Patch to SDL_hints.h (SDL_hints.h.patch, text/plain, 2016-06-07 14:24:13 +0000, 581 bytes)New rpivideo patch with SDL hint (SDL_rpivideo.c.patch, text/plain, 2016-06-07 14:24:35 +0000, 1477 bytes)Reported in version: 2.0.4
Reported for operating system, platform: Linux, ARM
Comments on the original bug report:
On 2016-05-31 16:10:39 +0000, Logan McNaughton wrote:
On 2016-05-31 16:13:53 +0000, Logan McNaughton wrote:
On 2016-06-01 14:23:12 +0000, Simon Hug wrote:
On 2016-06-01 14:53:52 +0000, Logan McNaughton wrote:
On 2016-06-01 18:43:26 +0000, Simon Hug wrote:
On 2016-06-01 19:42:33 +0000, Logan McNaughton wrote:
On 2016-06-01 19:43:01 +0000, Logan McNaughton wrote:
On 2016-06-01 19:43:23 +0000, Logan McNaughton wrote:
On 2016-06-01 19:44:37 +0000, Logan McNaughton wrote:
On 2016-06-02 13:01:55 +0000, Simon Hug wrote:
On 2016-06-02 14:16:04 +0000, Logan McNaughton wrote:
On 2016-06-06 20:58:34 +0000, Philipp Wiesemann wrote:
On 2016-06-06 21:32:45 +0000, Logan McNaughton wrote:
On 2016-06-07 14:24:13 +0000, Logan McNaughton wrote:
On 2016-06-07 14:24:35 +0000, Logan McNaughton wrote:
On 2016-07-02 21:43:27 +0000, Philipp Wiesemann wrote:
On 2016-07-07 19:05:06 +0000, Logan McNaughton wrote:
On 2017-02-20 21:33:27 +0000, Logan McNaughton wrote:
On 2017-02-21 05:30:33 +0000, Sam Lantinga wrote:
On 2017-02-21 05:41:16 +0000, Logan McNaughton wrote:
On 2017-02-21 06:26:15 +0000, Sam Lantinga wrote:
On 2017-02-21 15:03:57 +0000, Jools Wills wrote:
On 2017-02-21 15:10:07 +0000, Jools Wills wrote:
On 2019-08-19 19:55:35 +0000, q3dev wrote:
The text was updated successfully, but these errors were encountered: