Author Topic: retrofe video still playing on background when launching TTX Games  (Read 25247 times)

PinealServo

  • Newbie
  • *
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Re: retrofe video still playing on background when launching TTX Games
« Reply #30 on: February 05, 2017, 09:39:13 PM »
PowerShell 1.0 might not support the -executionpolicy flag.  You can change the default execution policy by doing the following:

Start powershell from the Start menu or command prompt; you should get a powershell prompt.

At the prompt, type the following command:
Code: [Select]
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
Then exit powershell and try launching the script again.

This execution policy change will allow you to run local scripts, but will not run dynamically-downloaded scripts unless they're signed by a trusted certificate.

You also most likely have PowerShell v2 installed; it's the newest version installed by default on Windows 7, and if you have a newer version of Windows, you may have even newer versions of PowerShell.  If you find the location of a newer version, try running it with the -executionpolicy flag before you change the default policy setting and see if that works.

The /K flag to cmd.exe tells the shell to stay open after the script finishes. Since the shell is what RetroFE launched, it'll stay paused until you explicitly close the shell.  Instead of using the task manager, you could probably alt-tab to it and just exit normally.

Floyd

  • Jr. Member
  • **
  • Posts: 52
  • Karma: +0/-0
    • View Profile
Re: retrofe video still playing on background when launching TTX Games
« Reply #31 on: February 09, 2017, 08:16:58 PM »
I'm having the same problems running steam games through .bat file. Video keeps playing in my background. Tried a few suggestions and the closest one was the arguments = /K $rompath$ ... but after exiting the game the frontend just froze. Anyone provide some workaround?


EDIT:
I gave up on this method and just used Rocket Launcher as a default Steam games launcher for retrofe. The issue is fixed this way.
« Last Edit: February 09, 2017, 08:28:57 PM by Floyd »

ginzu

  • Newbie
  • *
  • Posts: 44
  • Karma: +1/-0
    • View Profile
Re: retrofe video still playing on background when launching TTX Games
« Reply #32 on: February 09, 2017, 10:32:11 PM »
Hello my friends,


Sorry for the  latter  reply, i was really busy,


and  thank  to Floyd for  your comment, in the past  my frontend  was Hyperspin, but  because  i met everytime a new bug i leave it completely.



so, unfortunatelly, i never succeeded with any recomandation ....      :(   

i tried what you told me PinealServo,

 Set-ExecutionPolicy -ExecutionPolicy RemoteSigned  (on the 2 version of PowerShell i have, but game won't launch  and  retroFe logs dosen't  help much more.


So, i had the idea to create  an ahk script :
the idea is quite simple but even there, i didn't succeed to make it work. (i have  not enough knowledge to make it work),  i passed lot  of time to read on autohotkey forum or on the internet and  made a lot  of tests....

the script must kill a cmd.exe process (or close it) when the  escape key is pressed (and  permit the exit of the game).


one  example  of ahk that i tried :

Code: [Select]
#NoEnv
#SingleInstance, Force
#Persistent

;launch the game : you need  to know the ahk_class : run AU3_Spy.exe to know it
Run, StreetFighter 4 Arcade Edition Export.bat


;if windows ahk class is no more existing, --> apply the following instructions: 
IfWinNotExist, StreetFighter 4 Arcade Edition Export
;stop (exit) one instance of cmd.exe; take care if there are other instance, only one instance will close.     
 Process, Close, cmd.exe
;exit the script  --> avoid to keep it runing on background
  ExitApp   
Return

you must understand that this  is one of my test, of course  i tried  with for example :
Esc::Process, Close, cmd.exe

 :P


but in this case,  the cmd  is closed immediately,

often it is like because the  game  is  in fulscreen, the command  within the ahk are not executed..........

i tried  lot  of code  with IfWinActive, IfWinExist etc..........     no succes!

is there  any expert with ahk somewhere here?   :P



the best ahk would be  an ahk script that only kill the correct cmd (or at least a cmd process on the exit  of the target game exe).

see you  ;)


« Last Edit: February 09, 2017, 10:34:16 PM by ginzu »

PinealServo

  • Newbie
  • *
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Re: retrofe video still playing on background when launching TTX Games
« Reply #33 on: February 10, 2017, 03:43:43 AM »
OK, well, I think I've found out how to add this "wait for a different exe than the one we launched to close" functionality to RetroFE itself.  I'll see if I can get a test program working in Windows and if it's successful, I'll try adding it to RetroFE itself.  Might take a little while, though.

Floyd

  • Jr. Member
  • **
  • Posts: 52
  • Karma: +0/-0
    • View Profile
Re: retrofe video still playing on background when launching TTX Games
« Reply #34 on: February 10, 2017, 06:27:51 AM »
Hello my friends,


Sorry for the  latter  reply, i was really busy,

and  thank  to Floyd for  your comment, in the past  my frontend  was Hyperspin, but  because  i met everytime a new bug i leave it completely.

I used Hyperspin just for a short span of time and switchedbto retroFe compliteley and I'm glad I did it. I still use retroFe only I've set RetroFe to launch my Steam games through Rocket Launcher.

ginzu

  • Newbie
  • *
  • Posts: 44
  • Karma: +1/-0
    • View Profile
Re: retrofe video still playing on background when launching TTX Games
« Reply #35 on: February 27, 2017, 08:35:36 PM »
Hi friends!   :D


I come with some news,

i found  a solution to get rid of this issue!   :P  however, i can't launch some games but  the problem don't come from RetroFe but from these games.

here is the code i use  within my ahk script and it  work good for SFIV for example:

Code: [Select]
RunWait typex_loader.exe Ttxshell.exe,,Hide
Sleep 5000 ;We want to give the game a few seconds to load before we monitor it.
WinWaitClose SF41

We must compile it first (autohotkey must be installed on the pc)
then, we just have to put  a shortcut (lnk) in the rom section with all the other shortcuts


to summary,   this code  is not  from me but From the famous Howard Casto  (thankx to him), someone had the same issue with his  frontend several years ago and Howard put this piece of code as  a solution.
After that, we just have to adapt the code for each game and  give the correct name of the windows or the name of the ahk class.  (here it's SF41 in my example).


hope it could help.   ;D