❔ Process.Start() Retroarch Emulator C#
Hello, I need some help with a code, I'm trying to run the retroarch emulator with the Process.Start command, the emulator even opens but it opens without the game, I believe I must be making a mistake in the command line I'm using a listbox to get the name of the game.
15 Replies
Youre missing a second argument btw
A long time ago, i flushed out running cmd processes from C# to run a utility to help me parse ESRI shapefiles... ive done many more dumb things since then but this is what i came up with:
Several attempts but still no success.
what is the value of lsbRoms.Text?
do you get a good name populated in rom?
have you printed out the command line and tried to run it in a terminal instead of through here?
Im not sure Process.Start attaches it's output to the console that triggers it unless you tell it to which means you may not see an error
if you're making a windows forms application to launch your roms, you should really use a combobox (dropdown) instead of a textbox and retrieve a list of roms from a selected folder
that way it fills in the right name for you
listbox roms name
ahh, so it's value is still called Text
yes, with another emulator that doesn't need the command line it works fine, but the other emulators don't meet what I need
well i think my questions are still valid
are you getting friendly names as the name? are your arguments in the right order? is your path being combined (use Path.Combine(A, B, C)...) properly?
can you get it to run with the output command from a terminal instead of through your app? Instead of Process.Start, do Console.WriteLine
can i send my project for you to look at?
no
lets solve this in a real world fashion
your coworkers might have access to github but most of the time they wont have the bandwidth to look
im just giving you ideas on how you can debug and step through and figure out where exactly it breaks
you say the emulator launches but no game... that means you gave it a bad file name or something to that effect...
I will try to run in the console
is the path to the rom as the argument an actual path?
are there spaces in the path and if so, are they surrounded with quotes?
yeah, thats your problem
string commandline = string.Format("-L \"{0}\" \"{1}\"", @"EMULATOR\Sega Genesis\cores\genesis_plus_gx_libretro.dll", rom);
you need to wrap your arguments in quotes when they have spaces
"Sega Genesis"
im actually working on building a 68000 MPU computer on a breadboard... it's the processor that powered the genesisyes
same problem with full path
Top
Thanks @saltypatron.eth, now worked fine. topic close.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.