eatkinola Posted November 6, 2018 Share Posted November 6, 2018 E.g., when implementing the ISystemEventsPlugin.OnEventRaised method and handling SystemEventTypes.GameStarting: ...is there a way to get the currently running game? I currently do this: PluginHelper.StateManager.GetAllSelectedGames()[0], and while it works fine when the plugin is used in BigBox it does not work reliably within LaunchBox. It'd be great if there was a method in PluginHelper to get the currently running game as an IGame. @Jason Carr: Pardon me if this was already mentioned in the past and I overlooked it on the forums. 1 Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted November 6, 2018 Share Posted November 6, 2018 Good to know. I don't believe that exists yet, but I'll add that to my list. 1 Quote Link to comment Share on other sites More sharing options...
eatkinola Posted November 20, 2018 Author Share Posted November 20, 2018 On 11/5/2018 at 9:10 PM, eatkinola said: PluginHelper.StateManager.GetAllSelectedGames()[0], and while it works fine when the plugin is used in BigBox Thanks for adding that to your list, @Jason Carr. Just noted for BB I also run into a problem with the GetAllSelectedGames() kluge when the game details screen is skipped. So a way to get the currently running IGame would help with both LB and BB plugin development. 1 Quote Link to comment Share on other sites More sharing options...
jayjay Posted November 20, 2018 Share Posted November 20, 2018 On 11/6/2018 at 3:10 AM, eatkinola said: PluginHelper.StateManager.GetAllSelectedGames()[0]. I would never of thought of that. Thanks. Quote Link to comment Share on other sites More sharing options...
eatkinola Posted December 10, 2018 Author Share Posted December 10, 2018 On 11/6/2018 at 10:32 AM, Jason Carr said: Good to know. I don't believe that exists yet, but I'll add that to my list. Hey @Jason Carr. Is this (getting the currently running game) something you might incorporate in the plugin API when working on the game loading screens? I suppose this is complicated by the fact multiple games can be launched by Alt-tabbing back to BB then hitting play game again, so there is no guarantee of a single running game. From the game details screen, you can actually hit enter rapidly in succession and get the game to load multiple times. Ah, the things we do when testing. Surely someone would've done that in the real world, anyway. On a related note, an ISystemEventPlugin's method gets invoked with a GameStarting event type even when the game load fails, e.g., "the specified rom is not found". I can make a workaround for this but my workaround is a bit klugey and I'm sure does not capture all cases; the logic you use is certainly more comprehensive. Would it be possible to only fire a GameStarting event if it first passes muster in your BB code? P.s. Thanks for working on the load screens by the way; will be nice to have that a core feature of BB. I'll hopefully post my windowed version for download later this week, once I work out a few more wrinkles. I learned a bit more about C#, p/invoke, and low-level input stuff when working on it; was kinda fun. 1 Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted December 10, 2018 Share Posted December 10, 2018 12 minutes ago, eatkinola said: Hey @Jason Carr. Is this (getting the currently running game) something you might incorporate in the plugin API when working on the game loading screens? Yes, I'll look to tackle this at this time. The play game stuff will need restructured somewhat for the plugins anyways, because currently the existing methods won't use the startup screens at all. 13 minutes ago, eatkinola said: From the game details screen, you can actually hit enter rapidly in succession and get the game to load multiple times. Ah, the things we do when testing. Surely someone would've done that in the real world, anyway. This has been a major thorn in my side. It seems that Windows will actually change the window focus strategy if you're pressing keys while the game is loading. I still have to come up with a solution for this before the official release. I want to make sure that no matter what you do, you can't start multiple copies or mess up the active window by just spamming keys. The latter is the difficult part. 16 minutes ago, eatkinola said: On a related note, an ISystemEventPlugin's method gets invoked with a GameStarting event type even when the game load fails, e.g., "the specified rom is not found". I can make a workaround for this but my workaround is a bit klugey and I'm sure does not capture all cases; the logic you use is certainly more comprehensive. Would it be possible to only fire a GameStarting event if it first passes muster in your BB code? I'll review this and see what I can do to improve it. 16 minutes ago, eatkinola said: P.s. Thanks for working on the load screens by the way; will be nice to have that a core feature of BB. I'll hopefully post my windowed version for download later this week, once I work out a few more wrinkles. I learned a bit more about C#, p/invoke, and low-level input stuff when working on it; was kinda fun. I am looking forward to seeing it. Especially since I'm learning how much of a challenge all of this is lol. 1 Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted December 12, 2018 Share Posted December 12, 2018 Hey all, already called you guys out over there, but just updating this topic to say that I *think* I've fulfilled all of these requests with 9.2-beta-3: 1 Quote Link to comment Share on other sites More sharing options...
eatkinola Posted December 12, 2018 Author Share Posted December 12, 2018 1 hour ago, Jason Carr said: Hey all, already called you guys out over there, but just updating this topic to say that I *think* I've fulfilled all of these requests with 9.2-beta-3 Yep, the new API features fix most of these issues very nicely. You can still spam the play game menu item, but I just ignore extra invocations in my plugin so it's no big deal from my perspective. Thanks so much for implementing these features. 1 Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted December 12, 2018 Share Posted December 12, 2018 1 hour ago, eatkinola said: Yep, the new API features fix most of these issues very nicely. You can still spam the play game menu item, but I just ignore extra invocations in my plugin so it's no big deal from my perspective. Thanks so much for implementing these features. Yeah, a fix for that is still coming before the official release. Quote Link to comment Share on other sites More sharing options...
eatkinola Posted December 15, 2018 Author Share Posted December 15, 2018 On 12/11/2018 at 9:40 PM, Jason Carr said: Yeah, a fix for that is still coming before the official release. The anti-spam logic for the BB Play Game command in beta-4 works great. Thanks. 1 Quote Link to comment Share on other sites More sharing options...
Wally Posted February 14, 2019 Share Posted February 14, 2019 With the implementation of Current Game running, I hope some dev can step in and create a plugin that can grab realtime screenshots and associate with one of Launchbox image Types inside the correct Platform. Building media would be so much easier... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.