[XP, VX or ACE] How to (programmatically) know if the game is fullscreen?

Rafael_Sol_Maker

Almighty God Jabu
Veteran
Joined
May 8, 2012
Messages
122
Reaction score
36
First Language
Portuguese
Primarily Uses
RMMV
Hello there, soldiers!

I have a little question... hmm, two little questions to ask here.

The first one is, basically, the title of this topic: How to, programmatically, know if the game is full screen? There's a "secret" built-in flag in the RGSS that determines it?

Back in time, I used a little trick in my custom resolution script [VX Toggle Fullscreen & Resolution v1.0]:



Code:
 def Graphics.fullscreen? # Property
screen_size = Win32API.new('user32', 'GetSystemMetrics', 'I', 'I')
screen_width = screen_size.call(0); screen_height = screen_size.call(1)
detect_fullscreen = false
detect_fullscreen = true if screen_width == 640 and screen_height == 480
return detect_fullscreen
end
But... there's an alternative? It's because my solution is quite simple to "hack". Only is needed to set the desktop resolution to 640x480, and start playing the game (altougth it would be a little hard to play, actually).

If someone wants to investigate this too, let's begin. We can use WinAPI and technical knowledge to discover what happens when the user press Alt+Enter.

Well, the second question is: Where in system registry I can find the Game configurations (the ones that popup when you hit F1). If someone here already known this, I don't need to find it myself, heheh.

Answered by FenixFyreX. Thanks, dude!

Any help is appreciated. Thanks for attention and have a nice day,

RSM
 
Last edited by a moderator:

FenixFyreX

Fire Deity
Veteran
Joined
Mar 1, 2012
Messages
434
Reaction score
308
First Language
English
Primarily Uses
I'm pretty sure there is a value in the registry that the program modifies itself when the screen is made to fullscreen or reduced. If you know how to access Ace's registry keys, go ahead and do that; it would be the most accepted way. I'll write some code on this and post it if you need help :)

Also keep in mind that the registry keypath to access changes with what bit your system is:

x32 = HKEY_LOCAL_MACHINE/SOFTWARE/Enterbrain/RGSS3/RTP

x64 = HKEY_LOCAL_MACHINE/WOW6432NODE/SOFTWARE/Enterbrain/RGSS3/RTP
 

Rafael_Sol_Maker

Almighty God Jabu
Veteran
Joined
May 8, 2012
Messages
122
Reaction score
36
First Language
Portuguese
Primarily Uses
RMMV
Hey, you answered the second question perfectly! Thanks, FenixFyreX! No, I won't need help to write the code, thanks. I generally don't need help to write codes, this will not be a excepetion. =D

A thing I don't like in RPG Maker Games is that the configuration is global for all games, but I want to make it individual, it's why I asked this. Why Enterbrain don't put every configuration in the .INI file? Aarghh!

I already found some scripts that changed the keyboard behaviour, now I only need to know when the game is truly running in fullscreen.

Again, thanks for the info.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,072
First Language
English
I'm pretty sure there is a value in the registry that the program modifies itself when the screen is made to fullscreen or reduced.
Mine doesn't seem to be modifying the registry, and so the games aren't retaining their full-screen resolution when I close them and restart them)

Or is this only when you have the editor installed?
 
Last edited by a moderator:

Rafael_Sol_Maker

Almighty God Jabu
Veteran
Joined
May 8, 2012
Messages
122
Reaction score
36
First Language
Portuguese
Primarily Uses
RMMV
Mine doesn't seem to be modifying the registry, and so the games aren't retaining their full-screen resolution when I close them and restart them)

Or is this only when you have the editor installed?
You're running from the editor? If yes, the editor probably forced it running fullscreen or not, depending on what you've checked on menu.Well, lemme continue to investigate my issue...
 
Last edited by a moderator:

Rafael_Sol_Maker

Almighty God Jabu
Veteran
Joined
May 8, 2012
Messages
122
Reaction score
36
First Language
Portuguese
Primarily Uses
RMMV
Well, I don't like to double post, but my topic was on page 2, so... Bump!

No one has any idea of how I can determine if the aplication *truly* is running in fullscreen? Would I investigate further in WinAPI calls made by the RGSSxxx.DLL?

C'mon men, this could be really useful if discovered!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Hey people! What do you think about a core plugin? This will save some lines of code that I repeatedly use in all my plugins...
Wondering if I should make my enemies scale in my non-linear rpg. I'm leaning towards yes, but I don't want to use Yanfly's plugin...
French folk trying to pronounce English words. I loved how the man pronounced squirrel as 'square friend'.
Therapist: any questions? Me: Yeah, are there actually people who think Hotel California is about drugs and not fame or are people just trying to upset me?
Therapist: They WHAT?
It's interesting. There are no safety hazards in our country, but if you look at the shelves in supermarkets, you'd say there's a zombie apocalypse here.

Forum statistics

Threads
94,592
Messages
922,144
Members
124,461
Latest member
ppkvvet
Top