16
Scripting / Passing arguments from layout code to emulator (from AM,not fe.plugin_command)
« on: August 31, 2018, 03:47:30 PM »
Hi.
Is there a way to pass arguments directly from the layout Squirrel code to the emulator on Windows?
I am not talking about calling an emulator with args from code (like with fe.plugin_command) but to pass arguments to the emulator being called from Attract Mode itself.
I thought it would be a common need but I could find nothing here nor on the documentation.
The problem is my front end has "Alternate" modes for the Virtual boy (to call the emulator with or without the anaglyph mode) and for the Vectrex (to call games with or without the overlays) and the way it is working now is whenever I press the key to change the mode (the layout changes to indicate which mode it is in) I rename a file accordingly. Then, when I run a game, an AHK script checks the file and according to its name calls the emulator with the appropriate settings.
It works but is far from neat and elegant and may cause problems in the future (apart from having to change the code on the layout and both AHK script whenever the path changes).
Preemptive thanks!
Is there a way to pass arguments directly from the layout Squirrel code to the emulator on Windows?
I am not talking about calling an emulator with args from code (like with fe.plugin_command) but to pass arguments to the emulator being called from Attract Mode itself.
I thought it would be a common need but I could find nothing here nor on the documentation.
The problem is my front end has "Alternate" modes for the Virtual boy (to call the emulator with or without the anaglyph mode) and for the Vectrex (to call games with or without the overlays) and the way it is working now is whenever I press the key to change the mode (the layout changes to indicate which mode it is in) I rename a file accordingly. Then, when I run a game, an AHK script checks the file and according to its name calls the emulator with the appropriate settings.
It works but is far from neat and elegant and may cause problems in the future (apart from having to change the code on the layout and both AHK script whenever the path changes).
Preemptive thanks!