Jump to content
LaunchBox Community Forums

Recommended Posts

15 hours ago, Lahma said:

I'm sure it could do that, but C# code should be able to accomplish anything that it can. I'm actually going to try to implement a background thread that takes care of that problem. I'm just trying to figure out what would be the best logic to use to handle such a thing... For example I could do something such as:

if (BigBox or LaunchBox are currently in focus/foreground)
{
    if (steam comes into foreground/focus)
    {
        minimize(steam)
    }
}

That would of course prevent you from switching directly to Steam from LaunchBox/BigBox which isn't really desirable... I suppose I could simply prevent the Steam UI from taking focus only while BigBox is running... What do you think?

That might do the trick man. I don't know much about programming. Just suggestions. I never understood why Valve never added an option to to close Steam to the tray after exiting BPM. It's been requested since the first BPM beta or whatever lol. Hopefully you figured something out :)

Link to comment
Share on other sites

Just wanted to let y'all know I spent the entire day yesterday working on the plugin, and I got Windows game support working, DOSBox game support working, ScummVM game support working, and got everything fixed with special characters. I'm working on the Steam client taking focus from BPM problem right now. Whether I get that fixed or not, I will be uploading an update today for sure, and uploading the source to GitHub.

  • Thanks 1
Link to comment
Share on other sites

Sorry I haven't gotten it uploaded yet, but I wanted to get the 'Steam taking focus from LaunchBox/BigBox' problem worked out so I wouldn't have to do 2 updates right in a row. I'm happy to say, I just finished implementing a reasonable workaround for the issue. Being that its 6:30 AM, I'm going to get a bit of sleep, but since I finally got everything finished up, I'll get everything uploaded tomorrow. Thanks for your patience everyone.

Link to comment
Share on other sites

2 hours ago, Lahma said:

Sorry I haven't gotten it uploaded yet, but I wanted to get the 'Steam taking focus from LaunchBox/BigBox' problem worked out so I wouldn't have to do 2 updates right in a row. I'm happy to say, I just finished implementing a reasonable workaround for the issue. Being that its 6:30 AM, I'm going to get a bit of sleep, but since I finally got everything finished up, I'll get everything uploaded tomorrow. Thanks for your patience everyone.

Take your time man!!!
 

Link to comment
Share on other sites

The new release (v0.9.0.2) has been uploaded:

  • Added support for PC/Windows games, DOSBox games, and ScummVM games
  • Fixed a bug preventing any games with a non-ASCII character in their file name from being launched
  • Added a workaround for an annoying issue that causes the Steam UI to steal focus and/or move into the foreground in front of LaunchBox/BigBox after exiting certain games
    Note #1: LaunchBox/BigBox must be run once and then restarted for the config.xml to be updated in order for this new feature to start working
    Note #2: This workaround can be enabled/disabled by changing the value of 'PreventSteamFocusStealing' in config.xml

@The_Keeper86 Make sure to read Note #1 in the changelog above.

I was supposed to be on the road like 4 hours ago, so I will upload the source to GitHub when I get to my destination very late tonight. 

I added/changed quite a bit in this release, so if you experience any problems, please post them here so I can look into them ASAP.

Edited by Lahma
  • Thanks 2
Link to comment
Share on other sites

19 minutes ago, Lahma said:

So, no problems/issues/bugs yet? After lunch, or maybe this evening instead, I will work on getting the source code pushed out to GitHub.

I played with it Saturday night and haven't had any issues. At least non regarding the UI taking focus. Looks like it might be fixed! :)

Link to comment
Share on other sites

2 hours ago, Lahma said:

So, no problems/issues/bugs yet? After lunch, or maybe this evening instead, I will work on getting the source code pushed out to GitHub.

Everything's running great for me so far. Pokémon is working great now!

Link to comment
Share on other sites

Hey Lahma,

I've only just gotten the chance to test this with a Windows game. I tested both EA's StarWars Battlefront and the GOG release of Star Wars Shadows of the Empire, both of which I couldn't get the Steam Controller to work or get Steam Overlay to come up. I am wondering if EA's Origin is causing issues for Battlefront and if the GOG Window7-10 Launcher Fixer is causing that one to not work. LucasArts always had awful launchers for their Windows games. I don't have anything that's not already a Steam game installed to test with at the moment. I'll need to download some of my other GOG library and install and give something that doesn't use a launcher a try.

Also, side question. Will the end user be able to maintain separate controller profiles for each game in their BigBox Library when launched through Steam, or do you have to hit the Steam button in each game and re-select the controller profile everytime?

Thanks for your hard work! 

Link to comment
Share on other sites

@coasternd

Let me address a couple of points before talking about the specific games you discussed. The SteamLauncher plugin should work now for any game, so long as that game/launcher works with the Steam overlay under normal circumstances (when not using the plugin.) If you notice the Steam overlay isn't work for a particular game, you can quickly rule out SteamLauncher as the source of the problem by manually adding a non-Steam game to Steam and then running the new shortcut from within Steam to see if the overlay is working properly. If it doesn't work, then its almost certainly a game/launcher specific issue, and usually a quick Google search (such as 'Star Wars Shadows of the Empire GOG steam overlay') will provide the answers you need. 

One common issue that would prevent the Steam overlay from working with a particular title is that the game/launcher is set to run as an admin (MANY times without any good/valid reason), but Steam and/or LaunchBox are running with normal privileges (NOT run as an admin). If the game is launched/run with higher privileges than Steam is running with, Steam can't hook into the process to attach its overlay. To overcome this problem, I know a lot of people simply choose to set Steam to 'Run as Admin' by default, but this really is not a great thing to do from a security perspective. Its a bad practice for game developers to ship their games this way, especially games that have online functionality, because if an attacker manages to exploit a bug in the game to gain control over the process, they have 100% unrestricted admin access to your machine. 

If you find yourself in this boat with a particular title, there are a couple of things you can do. First thing would be to check the properties of the game/launcher EXE and see if you can simply disable this behavior by navigating to the "Compatibility" tab and unchecking "Run this program as an administrator" if available. If this option is not available (an executable can request/require admin privileges at runtime), there is another solution you can try:

By running the following command, you can force the EXE to run without admin privileges, and with games, this usually won't cause any problems, as they typically do not have a legitimate need for escalated privileges:

    cmd /min /C "set __COMPAT_LAYER=RUNASINVOKER && cd "C:\ExamplePath\ExampleGame" && start "" "C:\ExamplePath\ExampleGame\game.exe""

To configure your LaunchBox shortcut to do this, you can either configure the command-line parameters for the LaunchBox game yourself, or you can take the much easier route and use a preconfigured batch file I just created:

EASY METHOD:

Spoiler

- Download this batch file and put it inside the root folder of the problematic game (the folder that contains the game/launcher EXE)

    RunAsNonAdmin.bat

- In LaunchBox, find the game you want to force to run without admin privileges 

- Right click the game and click 'Edit'

- At the bottom of the window on the 'Launcher' tab, click 'Browse' under 'Application Path' and select 'RunAsNonAdmin.bat' that you just saved to your game's root folder

- Further down, look for 'Application Command-Line Parameters', and type into this box the filename of your game/launcher EXE (ex: game.exe)

- Click 'OK'

- Click 'Yes' if a message box pops up saying, "The application or ROM file path is not located within the game's root folder. Would you like to automatically update it?"


MANUAL CONFIGURATION METHOD:

Spoiler

- In LaunchBox, find the game you want to force to run without admin privileges

- Right click the game and click 'Edit'

- At the bottom of the window on the 'Launcher' tab, change 'Application Path' to:

    c:\windows\system32\cmd.exe

- Change 'Application Command-Line Parameters' to:

    /min /C "set __COMPAT_LAYER=RUNASINVOKER && cd "C:\ExamplePath\RootFolderOfExampleGame" && start "" "C:\ExamplePath\RootFolderOfExampleGame\game.exe""

    Note: You will obviously need to change "C:\ExamplePath\RootFolderOfExampleGame" and "C:\ExamplePath\RootFolderOfExampleGame\game.exe" to the appropriate paths for your selected game

- Click 'OK'

- Click 'Yes' if a message box pops up saying, "The application or ROM file path is not located within the game's root folder. Would you like to automatically update it?"

If this was the problem preventing the Steam overlay from showing on a particular game, Steam should now be able to successfully show the Steam overlay when launching games with SteamLauncher

Moving on... There are other issues which can prevent Steam from showing its overlay, such as is the case with the Origin and UPlay. The problem there is that they are just outright preventing Steam from hooking into their app and therefore blocking the Steam overlay. The Steam overlay used to work with Origin, but in an update (I think sometime last year), they started explicitly blocking it. The only workaround I know of in this case is to use something like GloSC.

As for controller profiles, each Steam controller profile will be maintained independently, and each time you load that game/rom, any changes you made to the controller profile when playing that game/rom previously will automatically be loaded on your current gaming session. You do not need to load a controller profile every time you launch a game/rom. 

Link to comment
Share on other sites

19 hours ago, coasternd said:

Hey Lahma,

I've only just gotten the chance to test this with a Windows game. I tested both EA's StarWars Battlefront and the GOG release of Star Wars Shadows of the Empire, both of which I couldn't get the Steam Controller to work or get Steam Overlay to come up. I am wondering if EA's Origin is causing issues for Battlefront and if the GOG Window7-10 Launcher Fixer is causing that one to not work. LucasArts always had awful launchers for their Windows games. I don't have anything that's not already a Steam game installed to test with at the moment. I'll need to download some of my other GOG library and install and give something that doesn't use a launcher a try.

Also, side question. Will the end user be able to maintain separate controller profiles for each game in their BigBox Library when launched through Steam, or do you have to hit the Steam button in each game and re-select the controller profile everytime?

Thanks for your hard work! 

@coasterndDid you get a chance to try disabling "Run as Admin" for Star  Wars Shadows of the Empire to see if that fixed your problem with the Steam overlay? From some quick research that I did, it sounds like that is the only issue preventing the GOG version of that game from working with the overlay. For that particular title, I think you can just open the properties of the game EXE and disable "Run as Admin" on the Compatibility tab.

Link to comment
Share on other sites

I haven't yet, it never occured to me to see if these two would work on their own as native Steam shortcuts. I've had GloSC for a while now and it seems to be a great little tool.

After I get off work I'll try and test this out. 

Thanks again!

Link to comment
Share on other sites

I know I can do this by changing the system names in Launchbox which is probably what I'll end up doing but I was wondering before doing that would it be possible to have the system name shorter in Steam? For example instead of saying game name (Sony Playstation 2) it could say game name (PS2) ? I hope this makes sense.

Link to comment
Share on other sites

8 hours ago, The_Keeper86 said:

I know I can do this by changing the system names in Launchbox which is probably what I'll end up doing but I was wondering before doing that would it be possible to have the system name shorter in Steam? For example instead of saying game name (Sony Playstation 2) it could say game name (PS2) ? I hope this makes sense.

The plugin download page explains how to do this in depth:

https://forums.launchbox-app.com/files/file/972-steamlauncher/

Here is the relevant section:

 

Customize Platform Names

When roms are launched with the plugin, the title of the game, as Steam sees it, will be in the format of: "Game Title (Platform Name)"

        Example: Super Mario Bros. (Nintendo Entertainment System)

For whatever reason, you may want to keep the long "official" name of the platform in LaunchBox, but use a shortened, abbreviated, or different platform name inside of Steam. The plugin has this functionality available, and it can be enabled by following these instructions:

  • Open the SteamLauncher directory and look for a file named 'config.xml'
     
  • If you do not see the file, you need to launch at least 1 game with the plugin, and then manually close LaunchBox, and the file should then appear in the directory
     
  • Open the file with a text editor, and look for the line labeled, '<CustomPlatformNames>'
     
  • Anywhere under this line, and before the line labeled, '</CustomPlatformNames>', you can add as many new lines as desired in the format of:

                <Platform Name="Original LaunchBox Platform Name" Custom="Custom Platform Name" />

  • You may already see a couple of example lines in place with fake platform names which you can copy/paste and modify to add your own custom platform names
     
  • After making your changes, simply save the file, close it, and then reopen LaunchBox
     
  • The next time you launch a game, you should see your new custom platform name substituting the real platform name in Steam (an easy place to see the title of the game you're playing is in the Steam overlay)
     
  • Just to reiterate, here is an example of what the aforementioned lines look like in my config file:

                <CustomPlatformNames>

                    <Platform Name="Super Nintendo Entertainment System" Custom="SNES" />

                    <Platform Name="Nintendo Entertainment System" Custom="NES" />

                    <Platform Name="Nintendo Game Boy Advance" Custom="Nintendo GBA" />

                    <Platform Name="Nintendo Game Boy Color" Custom="Nintendo GBC" />

                </CustomPlatformNames>

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...