Build Your Own Arcade Controls Forum

Main => Main Forum => Topic started by: loadman on May 10, 2008, 08:45:05 am

Title: MaLa FE. Under new management.
Post 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)
Title: Re: MaLa FE. Under new management.
Post by: loadman on May 22, 2008, 10:14:52 am
New Website:

http://forum.arcadecontrols.com/index.php?topic=79974.msg839202#msg839202 (http://forum.arcadecontrols.com/index.php?topic=79974.msg839202#msg839202)
Title: Re: MaLa FE. Under new management.
Post by: Bender on May 22, 2008, 10:18:07 am
Thanks for taking this on! :cheers:
Title: Re: MaLa FE. Under new management.
Post by: javeryh on May 22, 2008, 10:33:01 am
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:
Title: Re: MaLa FE. Under new management.
Post by: TheShanMan on May 22, 2008, 12:30:39 pm
Yeah, it's in the options dialog. You can map it to a button.
Title: Re: MaLa FE. Under new management.
Post by: fjl on May 22, 2008, 05:52:54 pm
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?
Title: Re: MaLa FE. Under new management.
Post by: loadman on May 22, 2008, 06:25:14 pm
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
Title: Re: MaLa FE. Under new management.
Post by: TheShanMan on May 22, 2008, 06:51:12 pm
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:
Title: Re: MaLa FE. Under new management.
Post by: dmworking247 on May 22, 2008, 08:47:55 pm
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.
Title: Re: MaLa FE. Under new management.
Post by: loadman on May 23, 2008, 01:36:05 am
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
Title: Re: MaLa FE. Under new management.
Post by: TheShanMan on May 23, 2008, 11:43:26 pm
Loadman, PM sent. And since it appears you can't attach files to a PM, I'm attaching it here.
Title: Re: MaLa FE. Under new management.
Post by: fjl on May 23, 2008, 11:48:10 pm
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.
Title: Re: MaLa FE. Under new management.
Post by: loadman on May 24, 2008, 02:34:17 am
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?
Title: Re: MaLa FE. Under new management.
Post by: headkaze on May 24, 2008, 07:35:38 am
TheShanMan: I'm curious how does that plugin work? Are you using GetForegroundWindow and then bringing MaLa to the foreground if it returns NULL?
Title: Re: MaLa FE. Under new management.
Post by: lettuce on May 24, 2008, 08:11:10 am
When will we see an update then?  ;D
Title: Re: MaLa FE. Under new management.
Post by: loadman on May 24, 2008, 08:23:08 am
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
Title: Re: MaLa FE. Under new management.
Post by: TheShanMan on May 24, 2008, 12:30:21 pm
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:

Quote
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:
Title: Re: MaLa FE. Under new management.
Post by: headkaze on May 24, 2008, 12:39:45 pm
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

Quote
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!
Title: Re: MaLa FE. Under new management.
Post by: TheShanMan on May 24, 2008, 04:00:50 pm
BTW I read this about GetForegroundWindow on MSDN

Quote
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.
Title: Re: MaLa FE. Under new management.
Post by: loadman on May 24, 2008, 07:29:38 pm
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)
Title: Re: MaLa FE. Under new management.
Post by: loadman on May 24, 2008, 08:32:57 pm


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)