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

● ARCHIVED · READ-ONLY
Started by Rafael_Sol_Maker 6 posts View original ↗
  1. 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
  2. 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
  3. 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.
  4. FenixFyreX said:
    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?
  5. Tsukihime said:
    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...
  6. 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!