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: New Topic Of Focus....My MaLa Loss Of Focus....FIXED by DaOld Man  (Read 21986 times)

0 Members and 1 Guest are viewing this topic.

mike boss

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2645
  • Last login:October 22, 2021, 01:19:45 pm
In my DK JR cabinet I have an old PC running MAME & MaLa.
I have the focus logger plug-in installed, but still face loss of focus every time.
I don't use the cabinet often, so the cabinet is off for long periods of time.
I've installed the plugin as noted, I've changed the load state to minimized (vs hidden), and made sure no background music is playing. All of these things I've read about prior. None the less the issue persists.

I've recently added some remote power switches from Costco (for remote power on)....they are super  cool! However a real pain since I always need to open the coin door and mouse click to regain focus. It is to the point where I'm looking to getting a new (old, used PC) and just doing another configuration.

Just wondering if someone can suggest something....a tip, a trick ?
I can look  tonight, I believe I'm running the newest BETA version of MALA.
« Last Edit: March 17, 2018, 09:44:11 pm by mike boss »

JamesTKirk

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 28
  • Last login:September 29, 2018, 09:09:02 pm
  • Boldly go .....
Re: New Topic Of Focus....My MaLa Loss Of Focus (Still can't fix)
« Reply #1 on: January 14, 2018, 12:55:42 am »
I used to have this exact same problem. Upgrading to Mala 1.82 beta solved it. Are you sure you are on Mala 1.82?

mike boss

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2645
  • Last login:October 22, 2021, 01:19:45 pm
Re: New Topic Of Focus....My MaLa Loss Of Focus (Still can't fix)
« Reply #2 on: January 16, 2018, 08:11:11 pm »
I believe I did. But I will look again.
Is it just me, is the MaLa site missing ?
I'm looking to DL the latest version.

Thanks

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5152
  • Last login:November 01, 2024, 03:51:36 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: New Topic Of Focus....My MaLa Loss Of Focus (Still can't fix)
« Reply #3 on: February 16, 2018, 09:49:31 pm »
So clicking the mouse fixes it?

JDFan

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3448
  • Last login:June 01, 2024, 11:31:20 pm
  • I want to build my own arcade controls!
Re: New Topic Of Focus....My MaLa Loss Of Focus (Still can't fix)
« Reply #4 on: February 17, 2018, 01:29:50 pm »
I believe I did. But I will look again.
Is it just me, is the MaLa site missing ?
I'm looking to DL the latest version.

Thanks

THe site has been flagged as a hazardous and/or malicious site - FIrefox gives you this warning

Quote
The site ahead may contain harmful programs

Firefox blocked this page because it might try to trick you into installing programs that harm your browsing experience (for example, by changing your homepage or showing extra ads on sites you visit).

Advisory provided by Google Safe Browsing.

SO you have to go into Details and click to bypass the blocking of the site in order to continue to the download page ( I'm pretty sure it is just a false warning due to some part of the program ( MalaKeyhook.dll IIRC ) but " Use at your own risk ! "  )
« Last Edit: February 17, 2018, 01:38:50 pm by JDFan »

mike boss

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2645
  • Last login:October 22, 2021, 01:19:45 pm
Re: New Topic Of Focus....My MaLa Loss Of Focus (Still can't fix)
« Reply #5 on: February 21, 2018, 09:02:15 am »
So clicking the mouse fixes it?


Yep, a click of the mouse fixes the issue. Which I guess isn't so bad, it's just a pain when the coin door is locked.
You fire up the cabinet, power on the machine, it boots up into MaLa, but nothing responds.
You need to do a mouse click on the Mala screen to gain the focus.
I've tried to mute the music and change the setting on how the game loads (from hidden, to minimized).
But for me nothing works.

I'm actually looking to swap out the PC with an old laptop I have kicking around and update my set up.


DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5152
  • Last login:November 01, 2024, 03:51:36 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: New Topic Of Focus....My MaLa Loss Of Focus (Still can't fix)
« Reply #6 on: February 21, 2018, 09:28:39 pm »
Well, not really a fix, but maybe a work around, if it works at all.
You can try putting my plugin 'control choose' in your mala plugins folder.
Then have control choose run a AHK script to simulate a mouse click when mala starts.
If interested I can post control choose and the AHK script on here, with more detailed instructions on how to set it up.

mike boss

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2645
  • Last login:October 22, 2021, 01:19:45 pm
Re: New Topic Of Focus....My MaLa Loss Of Focus (Still can't fix)
« Reply #7 on: February 23, 2018, 09:41:19 am »
That would be fantastic.
I'm happy with the set up, just frustrated with the focus issue.
If I could fix the issue it would save me hours of work.
I'd be very interested in your fix....please and thank you!

The only thing I don't like with my existing setup is the focus issue & I'd like to update my layout.
But layouts are my thing...and that is easy work.

I look forward to getting this resolved.

Thank you

EDIT, I use an inexpensive keyoboard encoder I got from China (Ebay).
I'm not sure what button is equal to what keyboard key. But I can sort that out if needed.
In general I know I really never use player 2 start.....so if pressing player 2 start was equal to a mouse click that would be awesome.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5152
  • Last login:November 01, 2024, 03:51:36 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: New Topic Of Focus....My MaLa Loss Of Focus (Still can't fix)
« Reply #8 on: February 23, 2018, 10:08:47 am »
Ok, here are control choose and ahk file that simulates left mouse click.
Unzip them to controlchoose.mplugin and sim_mouse-click.exe
Place control choose in the mala/plugins folder.
You can place the sim_mouse-click.exe in a place where you can easily find it. (The mala/plugins folder should be ok.
Run mala, and when it has started right click then click option/configurations then click on the event plugins tab.

You should see control choose in the list, click on it once to highlight it, then click the configure button below it.
On the control choose setup screen, choose new then click mala specific tab, select mala start action,  then browse to the sim_mouse-click.exe program. (Argument should not be needed).
Click OK then exit. quit mala, restart and see if it works.
If you'd rather run a button simulation instead of a mouse click, you will need to write a ahk file that does that, then have control choose call that ahk file instead of the mouse click.
Hope this works for you, and please let us know if it does.

EDIT, I have renamed the sim_mouse-click.exe to mouseclick.exe, zipped it and added it here. I also zipped and added the AHK script. (mouseclick_AHK.zip)
Enjoy!
« Last Edit: February 26, 2018, 07:51:43 pm by DaOld Man »

mike boss

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2645
  • Last login:October 22, 2021, 01:19:45 pm
Re: New Topic Of Focus....My MaLa Loss Of Focus (Still can't fix)
« Reply #9 on: February 23, 2018, 01:39:10 pm »

Thank you.

I appreciate the help.
I'm going to try and get to this right when I get home.
(pending the kids don't have other plans for me)
I'll be certain to post the results.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5152
  • Last login:November 01, 2024, 03:51:36 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: New Topic Of Focus....My MaLa Loss Of Focus (Still can't fix)
« Reply #10 on: February 23, 2018, 01:51:06 pm »
I just tested it and it didnt work I think it was because of the ahk name, maybe the _ or - is it?
I changed the name to mouseclick.exe, deleted the first action in control choose and added a new one entering the mouseclick.exe in the action line. It worked then.
So if it dont work for you, try renaming sim_mouse-click.exe to mouseclick.exe, then make sure the action in control choose points to the new name.

You can manually edit the actions list in mala/plugins/ctrlchse/actions.txt, but it's probably easier to do it from within control choose setup.
There is also a logs folder in there where you can view the last 5 or so runs of control choose. May be handy for trouble shooting.
Control Choose was never completely finished, for there didnt seem to be a whole lot of interest in it. But I think it is functional. If you come across any bugs I'd appreciate if you drop me a note or post it on here.
If there is enough interest from the community I can try to finish it up completely.

mike boss

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2645
  • Last login:October 22, 2021, 01:19:45 pm
Re: New Topic Of Focus....My MaLa Loss Of Focus (Still can't fix)
« Reply #11 on: February 24, 2018, 09:17:13 am »
Just wanted to provide my update.
So of course yesterday when I turned on the DK JR cabinet (Windows XP/Mala/MAME) .... the one giving me issues!
The focus issue wasn't a problem. The PC worked and I did not have to do a mouse click.
I wonder if the issue is sometimes brought on by extended periods of non use for the PC ?
I recently bought some switches from Costco that people use for X-Mass lights.
I use these so that I can turn on my machines via the remote. I love em !
Anyway since I changed the BIOS to boot from power loss it always activates windows Active Desktop.
Even though I disable it, it still comes on.

Anyway.......... the focus issue wasn't a problem upon initial boot yesterday. However I still set everything up as provided by DaOld Man (thanks again). I renamed the script to mouseclick.exe, and followed all the instructions as provided by DaOld Man. Did a couple of on/off and test and all was fine. This morning I booted up the PC and all was fine and I'll test again at various points over the weekend. I'll also test periodically in the next week-ish....and I'll provide the updates here.

I want to thank you again DaOld Man, your help was very much appreciated. I hope this has solved my problem.


JDFan

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3448
  • Last login:June 01, 2024, 11:31:20 pm
  • I want to build my own arcade controls!
Re: New Topic Of Focus....My MaLa Loss Of Focus (Still can't fix)
« Reply #12 on: February 24, 2018, 10:04:35 am »
I wonder if the issue is sometimes brought on by extended periods of non use for the PC ?

More likely a windows program running in the background -- whihc just happens to be more likely when the system has been off for awhile ( ie. a service like Defrag, Update, Scan, etc. - that is set to run weekly or monthly at a certain time will run whenever it gets a chance afterwards - so if the machine has been off for awhile it is more likely to have events that are waiting to get processed.)

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5152
  • Last login:November 01, 2024, 03:51:36 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: New Topic Of Focus....My MaLa Loss Of Focus (Still can't fix)
« Reply #13 on: February 24, 2018, 10:51:26 am »
Glad I could help Mike.
But what JD said could be the real problem. When you get time you may want to do some experimenting.
Maybe leave the PC off for a few days and see what happens.
You can disable control choose temporarily by just renaming the extension in the mala/plugins folder.
Example, change controlchoose.mplugin to controlchoose.xxmplugin. (extension can be anything as long as it's not mplugin, I like leaving the name in as much as possible to make it easier to change back later.)
Mala should not recognize the xxmplugin extension and not run control choose.
You can change the extension back for testing or if you decide you want to use it permanently.
Good luck, and happy gaming!

mike boss

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2645
  • Last login:October 22, 2021, 01:19:45 pm
Re: New Topic Of Focus....My MaLa Loss Of Focus (Still can't fix)
« Reply #14 on: February 24, 2018, 07:44:18 pm »
I've done a few different MALA/MAME combo setup's in the past. Never had the issue that I've had with focus before.
On the PC that gives me issues I even have the MaLa Focus Logger Plugin installed, and the problem continued.
IE the desire to add a second PC (a laptop actually) into the cabinet.
I will continue to test the PC and different intervals, 2 days, 5 days, a week, etc and report the findings.
I'd be happy to have this problem solved, then all that would remain on my DK JR is to update the layout giving it a fresh look!


mike boss

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2645
  • Last login:October 22, 2021, 01:19:45 pm
Re: New Topic Of Focus....My MaLa Loss Of Focus (Still can't fix)
« Reply #15 on: March 02, 2018, 10:42:04 am »
Had a spare few minutes before work today, so I fired up the cabinet.
All worked well, no issue with focus today.
I'll continue to test as noted, and hopefully this is fixed.

Thanks all

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5152
  • Last login:November 01, 2024, 03:51:36 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: New Topic Of Focus....My MaLa Loss Of Focus (Still can't fix)
« Reply #16 on: March 15, 2018, 09:20:17 pm »
Hi Mike. Is your cab fixed?
If so, did control choose fix it or are you using a different method?

mike boss

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2645
  • Last login:October 22, 2021, 01:19:45 pm
Re: New Topic Of Focus....My MaLa Loss Of Focus (Still can't fix)
« Reply #17 on: March 17, 2018, 09:24:03 pm »
So I fire up the cabinet again today............. no issue !
All is working well.
I'd say this is fixed !
YAY !
Now all that remains is to update my layout.
Thanks again !

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5152
  • Last login:November 01, 2024, 03:51:36 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: New Topic Of Focus....My MaLa Loss Of Focus (Still can't fix)
« Reply #18 on: March 18, 2018, 07:47:51 am »
So I fire up the cabinet again today............. no issue !
All is working well.
I'd say this is fixed !
YAY !
Now all that remains is to update my layout.
Thanks again !

Hey thats great news! Glad I could help.

mike boss

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2645
  • Last login:October 22, 2021, 01:19:45 pm
Re: New Topic Of Focus....My MaLa Loss Of Focus....FIXED by DaOld Man
« Reply #19 on: April 15, 2018, 07:18:28 pm »
So I fired up the cabinet today...looking at my last post it's almost been one month.
NO ISSUE ! I'd say it is safe to say the loss of focus issue has been fixed.

mike boss

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2645
  • Last login:October 22, 2021, 01:19:45 pm
Re: New Topic Of Focus....My MaLa Loss Of Focus....FIXED by DaOld Man
« Reply #20 on: May 12, 2018, 02:51:34 pm »
Turned on the cabinet today.....the last time would have been April 15th. So almost 1 month of no use. The loss of focus issue was a non issue. As stated before I think we can call this officially fixed.
Again I say thanks for all the help.

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1944
  • Last login:November 07, 2024, 07:47:13 pm
Re: New Topic Of Focus....My MaLa Loss Of Focus....FIXED by DaOld Man
« Reply #21 on: May 16, 2018, 03:16:27 pm »
So was upgrading to Mala 1.82 the solution or what?

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5152
  • Last login:November 01, 2024, 03:51:36 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: New Topic Of Focus....My MaLa Loss Of Focus....FIXED by DaOld Man
« Reply #22 on: June 07, 2018, 10:08:30 pm »
I think he solved it by having control choose run an AHK script to do a mouse click when Mala starts up.

pmc

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1034
  • Last login:December 20, 2023, 07:43:02 am
    • website
Re: New Topic Of Focus....My MaLa Loss Of Focus....FIXED by DaOld Man
« Reply #23 on: July 06, 2018, 12:31:14 pm »
Hi all. I wanted to try Control Choose too because I suspect it will simply and easily fix my problem as well. I'm running Mala 1.71 for some reason. Haven't tried to upgrade (don't really want to risk having to reconfigure anything... being lazy really). I already have AHK installed and use it for launching and configuring Windows games. Launching Mala "minimized" instead of "hidden" fixed the focus issue for me for the last couple of years, but I'm tired of seeing WindowsXP title-bars on the screen during game launch (an odd side-effect). If I go back to "hidden", Mala can lose focus after returning from a game (or initial run) and I have to grab a mouse.

Anyway, in the 3 files attached above, mouseclick.zip contains the ahk file instead of an .exe. mouseclick_AHK.zip contains mouseclick_AHK.ahk which is the same ahk file. Seeing that AHK generates the mouseclick directly (MouseClick, left, 55, 233), I assume the .exe is just the compiled script. So I compiled the script and call it from Control Choose as a Mala Start Event.

So far it seems to work for returning from a game, but on initial launch Mala does not have focus. When I click the "test" button, I see the mouse pointer relocate so it appears to be working. Should I try to impose a delay after launch (Sleep, DelayInMilliseconds)? Or am I doing something else wrong?

I could go to 1.74(5) which has force-focus code in it... but this fix should work adequately, no?

Thanks guys...

mike boss

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2645
  • Last login:October 22, 2021, 01:19:45 pm
Re: New Topic Of Focus....My MaLa Loss Of Focus....FIXED by DaOld Man
« Reply #24 on: November 10, 2018, 09:27:02 am »
I fired up my cabinet for the first time in a while (probably since I last updated the thread).
No issue ! I can think now can say DEFINITIVELY that the issue is fixed!

mike boss

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2645
  • Last login:October 22, 2021, 01:19:45 pm
Re: New Topic Of Focus....My MaLa Loss Of Focus....FIXED by DaOld Man
« Reply #25 on: December 25, 2019, 03:29:17 pm »
So I've had some major pc issues as of late. Long and short of it is once pc failed. I replaced it with another old, used pc I had that didn't work. So over a year ago I started to configure my old desktop for use in my Mario Bros cabinet. It would end up being my light gun cabinet. This thing was shelved for a year. I'm getting back to it.. guess the problem ! Loss of focus. So I'll be attempting this fix on the pc this week.

I'm sure it will work.

mike boss

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2645
  • Last login:October 22, 2021, 01:19:45 pm
Re: New Topic Of Focus....My MaLa Loss Of Focus....FIXED by DaOld Man
« Reply #26 on: December 26, 2019, 01:34:11 am »
I suffer from a loss of focus ! Well not me, my Mario Bros cabinet.
Long and short of it, I had a PC, it fried, I had another PC kicking around.............I got it configured for use............it did not work.
I took my old desktop PC and used that, it works. It however sat for one year, but in anticipation for New Years Eve I wanted to install it in my Mario Bros.

My plan is to get another PC built (as I truly can't recall where I left off) that will be for use in my Mario Bros MAME machine.
It will feature NES, TG16, Sega Master System and Genesis (+ MAME) and be configured to use my two Aim Trak light guns.

I'm kinda baffled. I had no issue with loss of focus on this machine, I've been kinda playing with it, getting some configuration done.
Now, all of a sudden, out of no place, I have a loss of focus.

I tried the above method to fix it, which has worked for me in the past. However it isn't working, yet if I manually click the mouse all appears fine.

Question, do I have to ensure AHK is running at start up ? Could this be part of the issue ?