VIDEO Fullscreen centering in OpenGL mode (SDL1)

Here you can discuss the development of patches.

VIDEO Fullscreen centering in OpenGL mode (SDL1)

Postby truth_deleted » 2013-7-23 @ 06:27

Attached two patches and a win32 binary of DOSBox-0.74/SVN for testing. The opengl patch is to center the fullscreen view while the height is less than 480 pixels; the width is not adjusted. The attached test binary incorporates this change; includes output=opengl and openglnb.

The voodoo patch centers the view (x & y) while the 3dfx resolution is less than 640x480; this worked in EF2000+3dfx (640x400) using a 4:3 LCD screen - hopefully it will work with a widescreen monitor and with a Windows guest OS. However, this code edit is not testable via this SVN-only binary.

I made these minor edits so that fullscreen openGL view is centered on the LCD screen for games of interest. It will require further changes to center other games properly.
You do not have the required permissions to view the files attached to this post.
truth_deleted
 

Re: Fullscreen centering in OpenGL mode

Postby Dominus » 2013-7-23 @ 06:36

Moved to the Dosbox Patches forum
User avatar
Dominus
DOSBox Moderator
 
Posts: 7672
Joined: 2002-10-03 @ 09:54
Location: Ludwigsburg

Re: Fullscreen centering in OpenGL mode

Postby emendelson » 2013-7-29 @ 18:20

Is it possible to make the opengl patch apply to any height and width? Under OS X 10.7 and 10.8, when the output is set to opengl or openglnb in the conf file, all text modes are off-center in full-screen: they're pushed partly to left, and fully to the bottom of the screen, a bit like this:

----------------------
|                        |
|                        |
|   xxxxxx           |
|   xxxxxx           |
|   xxxxxx           |
----------------------

Is it possible to use the screen width and height to calculate a way to center the text in the screen?
emendelson
Oldbie
 
Posts: 746
Joined: 2010-2-14 @ 02:00

Re: Fullscreen centering in OpenGL mode

Postby truth_deleted » 2013-7-29 @ 18:25

Does the openGL patch work that I posted in dosbox development? If fullresolution=desktop, then it may help; but I'll make that above change, too.
Last edited by truth_deleted on 2013-7-30 @ 04:21, edited 1 time in total.
truth_deleted
 

Re: Fullscreen centering in OpenGL mode

Postby emendelson » 2013-7-29 @ 18:48

I'm afraid that patch doesn't help with text-mode centering in full-screen with OpenGL.This has been an annoyance that's been talked about in the forum since it started occurring under OS X 10.7. (There was no problem under 10.6.) If it's possible to fix it, that would be very good to have.
emendelson
Oldbie
 
Posts: 746
Joined: 2010-2-14 @ 02:00

Re: Fullscreen centering in OpenGL mode

Postby truth_deleted » 2013-7-30 @ 04:21

If it works in 10.6, but not in 10.7, then it would be reasonable to notify Apple of the OS version specific bug. However, I saw your 2011 Vogons thread on the same or similar issue. Wasn't the conclusion that functions were deprecated in SDL and/or by Apple?

In the meanwhile, try both output=openglnb, then output=openglhq. Please try both output modes with fullresolution=desktop. If none of these options center the screen, then I would first try an older or properly patched version of the SDL library.
truth_deleted
 

Re: Fullscreen centering in OpenGL mode

Postby emendelson » 2013-7-30 @ 10:58

Thank you again! The problem is completely fixed with output=openglhq, which I simply didn't know about until I read your post.

With fullresolution=desktop, output=openglnb causes a text screen to stretch to fill the margin, distorting the bitmap fonts; openglhq doesn't cause this problem, and the screen is perfectly centered.

You've solved more problems in two days than I've solved by myself in two years. Thanks again.
emendelson
Oldbie
 
Posts: 746
Joined: 2010-2-14 @ 02:00

Re: Fullscreen centering in OpenGL mode

Postby truth_deleted » 2013-7-30 @ 23:02

Glad to help! There is also a recent post on another thread that states that (many) text modes disable aspect ratio, at least in opengl mode. It is possible this is the cause of the problem. However, the openglhq produces an excellent scaling of pure text, so this is an ideal solution; it also may avoid issues related to deprecation of API by Apple/SDL, as it is a different SDL driver.
truth_deleted
 


Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 1 guest