06-21-2019, 05:17 AM
(This post was last modified: 06-21-2019, 05:19 AM by DerVVulfman.)
Hey, about Chainsawkitten's script/dll combination? I changed my 'main' script to make a game begin fullscreen immediately, and ensure Alt+Enter doesn't work 100% immediately.
Now can ya change your game from fullscreen to windowed afterwards? Heck yeah. I set up nothing more then ... an EVENT to do it.
Yeah, in a script call, you need to give it a 1-frame delay between actions. Sound fun?
Code:
begin
# If not previously run (stop stack errors)
unless $@
# Run the DLL command with the Alt+Enter option still enabled
Win32API.new("System/F1AltEnterF12", "hook", "III", "").call(1,1,0)
# Prepare for transition
Graphics.freeze
# Force FullScreen by way of Keyboard Event
$showm = Win32API.new 'user32', 'keybd_event', %w(l l l l), ''
$showm.call(18,0,0,0)
$showm.call(13,0,0,0)
$showm.call(13,0,2,0)
$showm.call(18,0,2,0)
# Frame Update
Graphics.update
# Run the DLL command with the Alt+Enter option now disabled
Win32API.new("System/F1AltEnterF12", "hook", "III", "").call(1,1,1)
end
# Make scene object (title screen)
$scene = Scene_Title.new
# Call main method as long as $scene is effective
while $scene != nil
$scene.main
end
# Fade out
Graphics.transition(20)
rescue Errno::ENOENT
# Supplement Errno::ENOENT exception
# If unable to open file, display message and end
filename = $!.message.sub("No such file or directory - ", "")
print("Unable to find file #{filename}.")
end
Now can ya change your game from fullscreen to windowed afterwards? Heck yeah. I set up nothing more then ... an EVENT to do it.
Code:
@Script: Win32API.new("System/F1AltEnterF12",
: : "hook", "III", "").call( 1,1,0)
@Wait: 1 frame(s)
@Script: $showm = Win32API.new 'user32', 'keybd_event', %w(l l l l), ''
: : $showm.call(18,0,0,0)
: : $showm.call(13,0,0,0)
: : $showm.call(13,0,2,0)
: : $showm.call(18,0,2,0)
@Wait: 1 frame(s)
@Script: Win32API.new("System/F1AltEnterF12",
: : "hook", "III", "").call( 1,1,1)
Yeah, in a script call, you need to give it a 1-frame delay between actions. Sound fun?