-
Notifications
You must be signed in to change notification settings - Fork 70
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
Force the game to run stretch fullscreen #21
Comments
I've been a bit inactive on this project lately, but I can certainly give you a few pointers. Implementing manual stretching to native resolution is something I have been planning to do for the next major version (if I ever get to v0.3.0 first), but it's a lot more effort than it might first appear. You'd have to override the resolution setting in DisplayMode.cpp (maybe it was still in DirectDraw.cpp in v0.2.1) and convince the game it's running at the correct resolution (IDirectDraw::GetDisplayMode, EnumDisplaySettings(Ex), maybe even SystemParametersInfo and others) without confusing the original ddraw module about the same (most likely with some extra IAT hooks for that). If you lie to ddraw about the resolution it will most likely end up in the primary surface creation/usage failing (resolution not matching the display mode). Then you'd have to use some kind of scaling when presenting the internal primary surface to the real one in RealPrimarySurface.cpp compatBlt function. If you're fine with the builtin bilinear/nearest pixel scaling offered by DirectDraw then this is pretty simple, just use the Blt method of IDirectDrawSurface. Unfortunately the actual scaling method (bilinear vs nearest) is up to your GPU driver, but you can possibly influence it by changing the flags in the driver's Blt callback, which is now hooked in DeviceFuncs.cpp (though it wasn't in v0.2.1). If you only need upscaling, the mouse would need to be restricted to the original resolution rectangle via the ClipCursor win32 function, to preserve the original mouse movement speed and to avoid having to convert mouse input coordinates. Possibly alt-tabbing may need some fixes after all that in ActiveAppHandler.cpp to reset everything correctly when switching back and forth between other applications. As for fixing the performance issue, I can possibly help with that if you let me know which game you're having problems with (assuming I have the game and can reproduce the issue). You can also try to debug it yourself, or at least narrow down the problem to a single commit using git bisect. |
Hi! Thanks for your reply! Anyway, the game what I was running is O2Jam. There are several version out there you can try, such as O2V3, O2INT and O2PF, all of them are fanmade servers . This game originally made between Windows 2000 and Windows XP era. Let me know if you are interested for the performance fix. Once again, Thanks in advance! |
Hello @LumineBot, you might want to look at this thread here: #9. That thread is about O2Jam also. In addition, DxWnd has the ability to stretch a program to fill the screen. I posted a download here compatibility on o2jam that should allow O2Jam to work with DxWnd. |
@elishacloud Hi! thanks for the reply. Also I prefer to use DDrawCompat over DxWnd as it provide minimalist solution (only single binary, |
Yeah, I've worked on O2Jam issues before, but I'm not having any performance issues with the latest experimental release, either using my dedicated AMD or integrated Intel HD GPUs. Do you know if the issue is specific to your Nvidia GPU? Can you try switching to Intel HD? Since you seem to have a mobile GPU I guess you have some kind of Optimus setup, so that may complicate things, but I guess it's possible to configure it to run on Intel only? |
Display scaling has been added in v0.4.0. As for O2Jam, it went on my no-support list, along with all other online games. |
Hi there!
I'm running 800x600 game on 1920x1080 with DDrawCompat.
Everything works fine except the black border appear on the right and left side.
I want to the game to run forced into stretched fullscreen without modifying my graphic card settings. Because I've tried to modify my graphic card setting scaling into "Scale Fullscreen" option and the game performance drastically went down.
I've zero knowledge about ddraw and dx but I'm not really bad at cpp and I wish to contribute if possible.
Looking forward for the solution
Thanks for your awesome works, keep it up!
OS: Windows 10 Pro
Graphic Card: Intel HD Graphic 530 / Nvdia GeForce GTX 950M
EDIT:
Seems the lag is not caused by stretching game with my graphic card settings, but it's seems come from latest DDrawCompat, (I use it from the source, I compile the source directly in order to remove the logs).
I tried v0.21, the game run smoothly even with "Scaling Fullscreen" option turned on in within my graphic card settings. But still..
If you have pointer which code I should edit in v0.21 to stretch the game!
Or even better, make the latest one work proper as v0.21 do, because the game really stutter
Any both of them would be highly appreciated.
Thanks in advance.
The text was updated successfully, but these errors were encountered: