Force Full Screen with No Black Border

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by MeowFace, Oct 1, 2015.

  1. MeowFace

    MeowFace Meow Veteran

    Messages:
    1,034
    Likes Received:
    179
    Location:
    La La Land
    First Language:
    Meowish
    This is for the request here.

    But since it's only a demonstration of how things works. This script only force the game to run in full screen mode with no black borders. No window mode provided. Script writers, feel free to change it as you like.

    Features:

    [1] Force the game to run at full screen at game start.

    [2] Remove all black borders the default full screen has.

    How to Use:

    Script is plug & play. Paste it below Material and above Main

    Compatibility:

    Shouldn't be a problem since it's using a new method.

    Terms of Use:

    Free for use in both commercial and non-commercial projects.

    Please credit Vlue as well since i got the idea of resizing window from his window resize script.

    Script writers are welcome to modify this script to suits whatever situation you have in mind. Just don't forget the credits. ;)

    Script:

    Code:
    #==============================================================================# ■ Meow Face Force Full Screen#------------------------------------------------------------------------------# Force the game to run in Full Screen (with no black border)#==============================================================================# How to Use:# Plug & Play, Put this script below Material and above Main#==============================================================================MF_GPPSA = Win32API.new('kernel32', 'GetPrivateProfileStringA', 'PPPPLP', 'L')MF_FW = Win32API.new('user32', 'FindWindow', 'pp', 'l')MF_SWL = Win32API.new('user32', 'SetWindowLong', 'iii', 'i')MF_SWP = Win32API.new 'user32', 'SetWindowPos', ['l','i','i','i','i','i','p'], 'i'MF_FWE = Win32API.new 'user32', 'FindWindowEx', ['l','l','p','p'], 'i'MF_GSM = Win32API.new 'user32', 'GetSystemMetrics', ['i'], 'i'MF_TITLE = " " * 256MF_GPPSA.call('Game','Title','',MF_TITLE,256,".\\Game.ini")MF_TITLE.delete!(" ")MF_HWND = MF_FW.call('RGSS Player', MF_TITLE)MF_SWL.call(MF_HWND, -16, 0x14000000)module MEOW_RESIZE  def self.set    width = MF_GSM.call(0)    height = MF_GSM.call(1)    exwin = MF_FWE.call(0,0,"RGSS Player",0)    MF_SWP.call(exwin,0,0,0,width,height,0)  endendMEOW_RESIZE.set
     
    #1
    Wyrelade likes this.
  2. Ally

    Ally Linked Rooms Games Founder - Fleshforward Member

    Messages:
    332
    Likes Received:
    153
    Location:
    Italy
    First Language:
    Italy
    Primarily Uses:
    RM2k
    It is possible have a right code?
    The spoiler create a wrong text..
     
    #2
  3. Ally

    Ally Linked Rooms Games Founder - Fleshforward Member

    Messages:
    332
    Likes Received:
    153
    Location:
    Italy
    First Language:
    Italy
    Primarily Uses:
    RM2k
    Bump
     
    #3
  4. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    800
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    There you go:
    Code:
    #==============================================================================
    # ■ Meow Face Force Full Screen
    #------------------------------------------------------------------------------
    # Force the game to run in Full Screen (with no black border)
    #==============================================================================
    # How to Use:
    # Plug & Play, Put this script below Material and above Main
    #==============================================================================
    
    MF_GPPSA = Win32API.new('kernel32', 'GetPrivateProfileStringA', 'PPPPLP', 'L')
    MF_FW = Win32API.new('user32', 'FindWindow', 'pp', 'l')
    MF_SWL = Win32API.new('user32', 'SetWindowLong', 'iii', 'i')
    MF_SWP = Win32API.new('user32', 'SetWindowPos', ['l','i','i','i','i','i','p'], 'i')
    MF_FWE = Win32API.new('user32', 'FindWindowEx', ['l','l','p','p'], 'i')
    MF_GSM = Win32API.new('user32', 'GetSystemMetrics', ['i'], 'i')
    
    MF_TITLE = " " * 256
    MF_GPPSA.call('Game','Title','',MF_TITLE,256,".\\Game.ini")
    MF_TITLE.delete!(" ")
    MF_HWND = MF_FW.call('RGSS Player', MF_TITLE)
    MF_SWL.call(MF_HWND, -16, 0x14000000)
    
    module MEOW_RESIZE 
      def self.set   
        width = MF_GSM.call(0)   
        height = MF_GSM.call(1)   
        exwin = MF_FWE.call(0,0,"RGSS Player",0)   
        MF_SWP.call(exwin,0,0,0,width,height,0) 
      end
    end
    
    MEOW_RESIZE.set
     
    #4
    Ally likes this.
  5. Ally

    Ally Linked Rooms Games Founder - Fleshforward Member

    Messages:
    332
    Likes Received:
    153
    Location:
    Italy
    First Language:
    Italy
    Primarily Uses:
    RM2k
    Thank you @Sixth but no work in full screen...
    The window remain in 544x416 but without window border ^^
     
    #5
  6. Roninator2

    Roninator2 Gamer Veteran

    Messages:
    1,741
    Likes Received:
    381
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    So do you mean it is full screen? Just stretched across? The max resolution for Vx Ace is 640x480 anyways (with scripts).
    Or do you mean in stays in a window? And you can see your desktop around it?
     
    #6
  7. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    800
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    I have no idea what should this script do, I just fixed the lines.
    From the looks of it, it is like a borderless windowed mode. So, it is still windowed mode, but fully stretched without window borders.

    I don't see much point in doing that, especially because the player can still press ALT+F4, and when that happens, the game will switch into true full-screen mode, which won't have any zoom/stretch at all. You could disable ALT+F4 with another script, and it might have a use, but to stretch the game this way (without maintaining the aspect ratio), well, it looks ugly in every sense, in my opinion.
     
    #7

Share This Page