Build Your Own Arcade Controls Forum
Main => Main Forum => Topic started by: loadman on May 10, 2008, 08:45:05 am
-
Just in case you don't visit the software section very often, here is a link:
http://forum.arcadecontrols.com/index.php?topic=79974.0 (http://forum.arcadecontrols.com/index.php?topic=79974.0)
-
New Website:
http://forum.arcadecontrols.com/index.php?topic=79974.msg839202#msg839202 (http://forum.arcadecontrols.com/index.php?topic=79974.msg839202#msg839202)
-
Thanks for taking this on! :cheers:
-
Thanks loadman - I love MaLa and I don't even know 1/2 of what it can probably do.
Quick question: Is there a way to select a random game from a gamelist? I know how to get my cabinet to boot to a random game but it would be cool if you could press a button and a random game loads up from the list - you could imagine the crazy bets that can be made between friends after a few beers. Maybe this is already a feature and I just don't know about it...
:cheers:
-
Yeah, it's in the options dialog. You can map it to a button.
-
Hey loadman, has the newer versions of Mala finally fixed the problem where exiting a game, you cannot control the FE because it somehow becomes a background window and the only way to regain access is by clicking a mouse button?
-
Hey loadman, has the newer versions of Mala finally fixed the problem where exiting a game, you cannot control the FE because it somehow becomes a background window and the only way to regain access is by clicking a mouse button?
Yes.. ;D
-
Wha??? Loadman, you're acknowledging that 1.04 has this problem? I've gotten the impression in the past that there is no known focus problem with mala itself so I just wrote a plugin to log focus changes to a file so I could determine if some background app was the culprit, and the only culprit seems to be window "NULL" ;) So I changed my plugin to set focus to mala if no window has the focus. That seems to be working as a workaround, but I eagerly await the fix in the next version!
:cheers:
-
Hmm I've had that problems several times too... Mala starts up with Windows, but I can't navigate the menu or start a game... unless I alt+tab back to Mala or click the left mouse button (presumably giving focus to Mala).
Mala needs an 'always on top' type of option.
-
Wha??? Loadman, you're acknowledging that 1.04 has this problem? I've gotten the impression in the past that there is no known focus problem with mala itself so I just wrote a plugin to log focus changes to a file so I could determine if some background app was the culprit, and the only culprit seems to be window "NULL" ;) So I changed my plugin to set focus to mala if no window has the focus. That seems to be working as a workaround, but I eagerly await the fix in the next version!
:cheers:
OK Let me clarify. I Kinda lied as I was in a hurry at the time...
A Future version WILL fix it one way or another. I have not done it yet.
I acknowledge that some users tell me there is a problem. I have not experienced it yet personally but I only use Mame really.
So YES I will look at the problem and fix it one way or another eventually.
But if you think you can re-create the circustance in which it happens or a workaround please advise in a PM to save me time when I get around to looking at it
TheShanMan: Please send me details of your plug-in (and the plug-in) to help me.
Thanks
-
Loadman, PM sent. And since it appears you can't attach files to a PM, I'm attaching it here.
-
I think I had the problem only when I set mame to do the screen saver option where it randomly starts to show pictures of the games cause I'll exit a game, and MALA will be doing the screensaver thing. I have to press a keyboard button to exit the screensaver but then I lose complete control of MALA and have to do the mouse click to regain access.
I haven't used MALA in a while so I can't remember if the MALA screensaver was the cause or it happened everytime after exiting a game regardless if MaLa was set to use the screensaver or not. I simply remember it being an annoying and tedious problem.
-
Loadman, PM sent. And since it appears you can't attach files to a PM, I'm attaching it here.
Cool, Cam I post that on the malafe.net site until I get it fixed?
-
TheShanMan: I'm curious how does that plugin work? Are you using GetForegroundWindow and then bringing MaLa to the foreground if it returns NULL?
-
When will we see an update then? ;D
-
When will we see an update then? ;D
Sooner than if Swindus did not pass the code onto me ;D :laugh2:
I can't answer that. I just am spending my spare time getting me head around his code. I don't want to create a batch of new bugs by a 'premature release ;)
Please be patient. :P
-
Cool, Cam I post that on the malafe.net site until I get it fixed?
Yes. And I neglected to mention that the C runtime files (the non .plugin files) need to go in the mala directory itself. If you put them in the plugin directory then the plugin won't find them - windows looks for them in the directory of the exe, not of the .plugin file.
TheShanMan: I'm curious how does that plugin work? Are you using GetForegroundWindow and then bringing MaLa to the foreground if it returns NULL?
Exactly. Since loadman is going to make this publicly available and you inquired about it, I'll quote what I said to loadman via PM:
It starts a thread which has a hidden window, and a timer fires every 1/4 second. In the timer handler it calls the windows API GetForegroundWindow. If the window is NULL (no window has focus), then it tries to set focus back to MaLa.
It pretty much logs everything it finds to a log file, since the original intention was simply to find the cause of the focus problem (I thought some background app was taking focus). So it might be helpful for people to isolate the cause of their focus problems (be it MaLa or some background app) if you periodically check your log file for cases where some other application has the focus, or focus is NULL.
Some notes regarding what is seen in the log file:
- Of course, MaLa shouldn't always have focus - focus will shift to mame and may even legitimately be NULL sometimes (not sure on that one - perhaps this happens before MaLa gets focus back), so just because something other than MaLa has focus doesn't automatically mean there's a problem.
- This only checks focus every 1/4 second, so you can't assume that this is a perfect record of focus changes. It could certainly miss focus changes. The intention was to catch the problem where focus is stuck somewhere that it shouldn't be, and every 1/4 second is plenty for that. Plus I wanted to keep this plugin from consuming any more cpu cycles than necessary.
- If you see focus shifting to some background app, I'm not sure you can blame MaLa, or expect MaLa to be "fixed" for that. You probably need to look into getting rid of the background app.
-
Exactly. Since loadman is going to make this publicly available and you inquired about it, I'll quote what I said to loadman via PM:
I thought it was a good idea so I wrote a little program to do the same, it might help me figure out why a few people are having focus problems with CPWizard. Perhaps I need to do something like your plugin in CPWizard to check if it's foreground and force it to be when it should.
BTW I read this about GetForegroundWindow on MSDN
The return value is a handle to the foreground window. The foreground window can be NULL in certain circumstances, such as when a window is losing activation.
I notice it will return NULL when changing focus between applications including when switching between CPWizard and Mame.
Anyway thanks for the info, and we better give this thread back to loadman!
-
BTW I read this about GetForegroundWindow on MSDN
The return value is a handle to the foreground window. The foreground window can be NULL in certain circumstances, such as when a window is losing activation.
I notice it will return NULL when changing focus between applications including when switching between CPWizard and Mame.
Yep, I knew about that, and that's why I said focus can sometimes be NULL legitimately. I assume that's why sometimes the SetForegroundWindow call fails even though the foreground window is reported to be NULL (I log whether the call succeeds or fails).
Feel free to PM me if there's anything I can do to help you incorporate this kind of focus enforcement in CPWizard, or if you learn something about it that might be beneficial to my plugin.
-
Cool, Cam I post that on the malafe.net site until I get it fixed?
Yes. And I neglected to mention that the C runtime files (the non .plugin files) need to go in the mala directory itself. If you put them in the plugin directory then the plugin won't find them - windows looks for them in the directory of the exe, not of the .plugin file.
Cool I worked that out the hard way ;)
You Plug-in is now on the site.
http://malafe.net/index.php?page=plugins#malafocuslogger (http://malafe.net/index.php?page=plugins#malafocuslogger)
-
Can Anyone do Graphics for a new MaLa look?
http://forum.arcadecontrols.com/index.php?topic=80457.msg840011#msg840011 (http://forum.arcadecontrols.com/index.php?topic=80457.msg840011#msg840011)