Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PCSX2.exe Do not close!
#1
Hi,

i´m having a problem with the pcsx2.exe. I start my isos directly over CommandLine. To completely shut down the emulator after I press ESC, i used the --nogui option. This works very good. BUT when i press ESC the GSdx Window closes correct, but the "pcsx2.exe" is still active as process.
When I start the command line more times, then I have multiple pcsx2.exe in the TaskManager.

I´m Using the 0.9.8 Version

Is there any way to fix that? So that the exe closes in the process too??

Thanks for Help

GRONI
Reply

Sponsored links

#2
Guess that's still on "TODO" status:3 at least by looking at the code:
Code:
    if( !m_UseGUI )
    {
        // [TODO] : Prompt user before exiting, k thx. :)
        PrepForExit();
    }
Or simply doesn't work as it shouldTongue, the above changed from PrepForExit(); to Exit(); would probably result in pcsx2 completely exiting after pressing ESC when launched with -nogui. - But I'm lazy to find out, never using -nogui myself and there are more competent people in here for that.

Anyway if you're not into modding your pcsx2, then while it doesn't work, then there is now way to "set" something to make it work untill something fix that(assuming it's broken).
Reply
#3
I tested it with autoit to solve it like this

WinWaitActive("GSdx")
If not WinExists ("GSdx") then ProcessClose("pcsx2.exe")

But it do not work for some reason Sad
Reply
#4
Ok I solved it Smile

For everybody who want to do the same thing. Just install AutoIt with Scite and create a script and paste this code

WinWaitActive("GSdx","")
sleep(100)
If WinWaitNotActive("GSdx","") then ProcessClose("pcsx2.exe")

"GSdx" is the Graphic Plugin and the first latter of the caption Name. So when you choose another graphic plugin, just look at the gamewindow and see how this is named. Then compile the script to an Exe and start it along with the iso in the bat file. When you close Pcsx2, the whole process gets killed Smile

Greetz

GRONI
Reply
#5
I guess the "Send escape on window close" or "exit emulation on window close" options in Lilypad could help with that.
Core i5 3570k -- Geforce GTX 670  --  Windows 7 x64
Reply
#6
Hey Groni, thanks for the script. I tried it and it works perfectly. I'm going to hold onto it for sure. Smile
I'm currently using the program called "Media Center Studio" to hack the Windows Media Center up and it has a built in option to give "close" and "kill" keyboard shortcuts per item which in conjunction with a game controller profiler such as pinnacle makes one hell of a customizable and awesome gaming launcher/platform. It's very handy if you're looking for a slightly less hacky option and a sexy gaming launcher even though it's still kind of hacky. Tongue
Hey Shadow Lady, I think that option may still be on the TODO list as well? I tried it first and it didn't seem to do anything. Maybe there were some other settings in the way but I thought I got all of them. :/
Reply
#7
Bit of an old thread, but applies to version 0.9.8 so...

I ran into this issue today, configuring Emulators 2 plugin on MediaPortal 1.2.2.0. I solved it by installing PowerShell (WinXP) and calling the script below. I sourced the code snippets from here and there, so I can't take any credit. It needs two ESC presses, but I can live with it.

The first ESC exits game, as configured in the ini:
[GSWindow]
CloseOnEsc=enabled


The second ESC kills the pcsx2 process as per the powershell script.

Emulator Path: c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
Arguments: -executionpolicy unrestricted
Script Name: tekken4.ps1

Code:
function Get-KeyState([uint16]$keyCode)
{
  $signature = '[DllImport("user32.dll")]public static extern short GetKeyState(int nVirtKey);'
  $type = Add-Type -MemberDefinition $signature -Name User32 -Namespace GetKeyState -PassThru
  return [bool]($type::GetKeyState($keyCode) -band 0x80)
}

$VK_ESCAPE = 0x1B
start-process "E:\Pcsx2\pcsx2-r4600.exe" -argumentlist '"E:\Pcsx2\dvdimages\tekken4.iso" --cfg="E:\Pcsx2\inisCustom\tekken4.ini" --nogui'

do {
    $x = $host.UI.RawUI.ReadKey("noEcho,IncludeKeyDown")
}
until (Get-KeyState($VK_ESCAPE) eq true)

write-host "ESC key pressed"
stop-process -processname pcsx2-r4600
Reply
#8
They still would recommend to make your own thread Smile They don't like Necro-ing old posts Wink
Reply




Users browsing this thread: 1 Guest(s)