Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: MaLa FE. Under new management.  (Read 2882 times)

0 Members and 1 Guest are viewing this topic.

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
MaLa FE. Under new management.
« 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

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa

Bender

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1919
  • Last login:November 28, 2016, 08:12:21 pm
    • Happ to Tron Conversion tutorial
Re: MaLa FE. Under new management.
« Reply #2 on: May 22, 2008, 10:18:07 am »
Thanks for taking this on! :cheers:

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7962
  • Last login:Yesterday at 08:11:29 pm
Re: MaLa FE. Under new management.
« Reply #3 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:

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: MaLa FE. Under new management.
« Reply #4 on: May 22, 2008, 12:30:39 pm »
Yeah, it's in the options dialog. You can map it to a button.
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

fjl

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1152
  • Last login:March 04, 2017, 10:14:04 pm
  • Pixels Rule!
Re: MaLa FE. Under new management.
« Reply #5 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?

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: MaLa FE. Under new management.
« Reply #6 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

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: MaLa FE. Under new management.
« Reply #7 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:
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

dmworking247

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 305
  • Last login:July 14, 2024, 01:30:59 pm
Re: MaLa FE. Under new management.
« Reply #8 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.

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: MaLa FE. Under new management.
« Reply #9 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
« Last Edit: May 23, 2008, 04:54:55 am by loadman »

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: MaLa FE. Under new management.
« Reply #10 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.
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

fjl

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1152
  • Last login:March 04, 2017, 10:14:04 pm
  • Pixels Rule!
Re: MaLa FE. Under new management.
« Reply #11 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.

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: MaLa FE. Under new management.
« Reply #12 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?

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: MaLa FE. Under new management.
« Reply #13 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?

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: MaLa FE. Under new management.
« Reply #14 on: May 24, 2008, 08:11:10 am »
When will we see an update then?  ;D

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: MaLa FE. Under new management.
« Reply #15 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

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: MaLa FE. Under new management.
« Reply #16 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:
  • 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.
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: MaLa FE. Under new management.
« Reply #17 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!

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: MaLa FE. Under new management.
« Reply #18 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.
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: MaLa FE. Under new management.
« Reply #19 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
« Last Edit: May 24, 2008, 07:33:46 pm by loadman »

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: MaLa FE. Under new management.
« Reply #20 on: May 24, 2008, 08:32:57 pm »