Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class << Graphics
- public
- def toggle_fullscreen
- if fullscreen?
- windowed_mode
- else
- fullscreen_mode
- Window_Resize.f
- end
- end
- def update
- release_alt if Disable_VX_Fullscreen && Input.trigger?(Input::ALT)
- zeus_fullscreen_update
- toggle_fullscreen if Input.trigger?(Input::F5)
- toggle_ratio if Input.trigger?(Input::F6)
- toggle_fullscreen if Input.alt_enter_trigger?
- end
- def release_alt
- inputs = [1,18,2, 1,164,2, 1,165,2].pack('LSx2Lx16'*3)
- SendInput.call(3, inputs, 28)
- end
- alias zeus_fullscreen_update2 update
- def toggle_vx_fullscreen
- windowed_mode if @fullscreen and !vx_fullscreen?
- inputs = [1,18,0, 1,13,0, 1,13,2, 1,18,2].pack('LSx2Lx16'*4)
- SendInput.call(4, inputs, 28)
- zeus_fullscreen_update2
- Window_Resize.f
- self.ratio += 0 # refresh window size
- end
- end
- module Input
- VK_LALT = 0xA4
- VK_RETURN = 0x0D
- GetAsyncKeyState = Win32API.new('user32', 'GetAsyncKeyState', 'i', 'i')
- def self.alt_enter_trigger?
- (GetAsyncKeyState.call(VK_LALT) & 0x0001) != 0 && (GetAsyncKeyState.call(VK_RETURN) & 0x0001) != 0
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement