-
Notifications
You must be signed in to change notification settings - Fork 130
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
Unlock resolution #240
Unlock resolution #240
Conversation
removes the resolution restriction for the RGSS1 games
Mkxp will be able to guess/handle any game resolution automatically as long is lower than 2048/1536, without adding or editing the game resolution in "mkxp.conf". The actual size of the window will be determined automatically from the "eventhread.cpp" during the initial launch of the game.
Instead of using a static 640/480, now the resolution is dynamic and determined from the config.cpp.
Instead of using a window fixed 640/480 static size, the width and height will be determined from the game's thread window size.
- determines the size of the monitor - starts the window with the resolution settings taken from the config.cpp. - sets maximum size to monitor's resolution and minimum size to 800/600 - resizes the window to 800/600 (instead of using the size from the config.cpp) - starts the game and determines the actual width/height of the game. If the game uses a resolution lower than 800/600 it upscales it, if is higher adjusts automatically - Had to add a "firstrun" value/check to fix a strange behavior/bug? (when entering/exiting fullscreen) in linux.
What happens to rgss1 tilemaps when a higher resolution is set? I was certain they were hard-coded for the original resolution. Also, which games require these changes? |
Correct they are hard-coded. Both the game window and it's tilemaps will retain their original size/resolution. games shorted by resolution 960x640 1280x720 1280x960 |
Note: the only "problem" would be with rgss2 and rgss3 if you set a resolution lower than the resolution of the game. Applying a minimum hard limit by editing the lines 293 and 296 of config.cpp is enough to fix this |
So, I poured over the code changes multiple times now and I'm still not entirely sure what they're supposed to solve. Could you state:
thanks! |
I can understand the confusion
... 108 & 127-130 are not needed, unless you want to define the minimum, initial and maximum sizes of the window... *I added those lines for compatibility with some custom resize scripts when used with your WIN32API wrapper. Without them when exiting fullscreen mode, the window is always placed in the upper right corner of the monitor. |
Sorry for the late reply.
I think we need to converge on a common vocabulary here. 640x480 is the game screen resolution, not the window size. If you set
so this means you want a variable screen resolution that is dependent on the current window size?
on Linux this always happened correctly for me already with no involvement from mkxp's side. Also, if it doesn't work that way, I think it's SDL's problem to solve; if they won't I can think about a workaround but I'd like to go the proper way first. |
Correct. As it is now 640x480 is the game screen resolution.
Yes. Initially, I only wanted a variable game resolution.
For me on windows 7/10 always worked correctly. |
I think this branch of mkxp-freebird should do what you want (alternatively, consider using mkxp-z which has a lot more features in general). |
Sorry for the late reply. |
Modification to unlock window size & resolution.
Automatically determines the game's resolution.
If it is lower than 800/600 it upscale's it to 800/600 (can be changed in lines 129 & 130 of eventhread.cpp)
and if the game uses a higher resolution auto-adjusts the window.
note: on linux (at least on my machine) it cannot auto-adjust the initial window, if the default allowed resolution is equal or higher
of the monitor resolution (the initial window size will be equal to the monitor resolution).
Probably a bug of my linux drivers.
Since I am not sure why it happens (linux drivers?/ SDL bug?/XFCE bug?), the workaround was to set the
defScreenW and defScreenH in "mkxp.conf" to a smaller value than the monitor resolution.
e.g. On a monitor 1920/1080 can be set to
defScreenW=1910
defScreenH=1070
and then works correctly.