Author Topic: demul full screen improvements  (Read 2953 times)

Bgoulette

  • Sr. Member
  • ****
  • Posts: 116
  • I wrote a book.
    • View Profile
    • BlakeGoulette.com
demul full screen improvements
« on: December 26, 2018, 06:31:06 AM »
Edit: I attached the relevant files, as well as made some changes to the akh script: now it stretches a 1x1 black pixel across the screen until demul loads a rom. There's still a brief flash, but it's getting better. A little. Meh. :)

I've written a dirty little AHK script that, in conjunction with a batch file, launches demul with a user-defined rom, and sets it to full screen, as well as enables the Esc key to return to AM. It _works,_ but it could be better; specifically, it exposes the desktop for about 3 seconds while demul loads the rom before entering full screen. And there's a flash of the same when exiting (I think). I'm running Windows 10 on an i5 with a GTX 1050Ti card. Here are the scripts I'm using, as well as the guts of the demul.cfg file:

Batch file (dfs.bat):
Code: [Select]
@echo off
"C:\Program Files\AutoHotkey\AutoHotkey.exe" demul_full_screen.ahk %1

AHK script (demul_full_screen.ahk):
Code: [Select]
#SingleInstance, force
SetTitleMatchMode, 1

; Move the mouse to the bottom right:
MouseMove % A_ScreenWidth, A_ScreenHeight, 0

; Display a single image as a SplashImage:
SplashImage, pixel.gif, b w%A_ScreenWidth% h%A_ScreenHeight% x0 y0 zw%A_ScreenWidth% zh%A_ScreenHeight%

RomName := A_Args[1]
Run %ComSpec% /c "demul.exe -run=naomi -rom=%RomName%", , Hide

; When demul.exe loads a rom, its title changes to a string beginning with gpuDX11hw
WinWaitActive, gpuDX11hw, , 3
Send !{Enter}
SplashImage, Off
return

#IfWinActive, ahk_exe demul.exe
    Esc::
    WinClose, A
    ExitApp

#IfWinActive

demul.cfg:
Code: [Select]
# Generated by Attract-Mode v2.5.1
#
executable           D:\Users\Blake\demul\dfs.bat
args                 [name]
workdir              D:\Users\Blake\demul\.
rompath              D:\Users\Blake\demul\roms
romext               .zip;.7z
system               Arcade
info_source          listxml
exit_hotkey          Escape
pause_hotkey         P
artwork    marquee         $HOME/demul/marquee
artwork    snap            $HOME/demul/video;$HOME/demul/snap

Any thoughts on improving this set up? I'd really like to know if there's a way to launch, say, some big, black screen that hides EVERYTHING until the WinWaitActive command in the ahk script completes, but maybe I'm going about it the wrong way altogether? Thanks for reading!
« Last Edit: December 26, 2018, 02:02:21 PM by Bgoulette »