Jump to content
LaunchBox Community Forums

Hide mouse pointer not working with demul


dejawho

Recommended Posts

Whilst this part isn't much help to you - Launchbox 10.14 with Demul 28/4/18 is working here to hide the mouse.

Works with hide mouse cursor during game checked in emulator startup screen page, and also when hidden on start up/load screen and in emulator.

Like I say sorry that this isn't much help.

However a work around would be to add the following into the Running Autohotkey Script

It will move the mouse "off screen" and block any input to it so won't be able to come back on screen or annoy you (or be used full stop) and then on closing using Escape (Or change to whatever you use) will allow mouse to be used again and put back into middle of screen (well middle of my screen which is 1920x1080 - you can change those numbers to whatever you want) or you could just move it and not block it if you want/need to be able to use it whilst Demul is open

Or you could use nomousy

If you have already thought of this and it comes across as teaching you to suck eggs please accept my apologies.

Hope this helps

MouseMove, 9999, 9999
BlockInput, MouseMove

$Esc::
{

BlockInput MouseMoveOff
MouseMove, 960, 540, 0
WinClose, ahk_exe {{{StartupEXE}}}
}
 

 

Edited by Kiinkyfoxx
  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...
  • 10 months later...
6 hours ago, PiperCalls said:

Same prob. Don't think I can block mouse using a lightgun. Tried hide mouse, no mousy, nothing working...

The following MIGHT work but semi untested as I'm not having the issue here and don't want to play with a system that isn't broken at my end

Try adding the following to the Running Autohotkey Script tab in the edit emulator section

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

SetSystemCursor1(Cursor := "")

SetSystemCursor1(Cursor := "", cx := 0, cy := 0) {

   SystemCursors := "32512IDC_ARROW,32513IDC_IBEAM,32514IDC_WAIT,32515IDC_CROSS,32516IDC_UPARROW"
   . ",32640IDC_SIZE,32641IDC_ICON,32642IDC_SIZENWSE,32643IDC_SIZENESW,32644IDC_SIZEWE"
   . ",32645IDC_SIZENS,32646IDC_SIZEALL,32648IDC_NO,32649IDC_HAND,32650IDC_APPSTARTING,32651IDC_HELP"

   if (Cursor = "") {
      VarSetCapacity(AndMask, 128, 0xFF), VarSetCapacity(XorMask, 128, 0)

      Loop Parse, SystemCursors, % ","
      {
         CursorHandle := DllCall("CreateCursor", "ptr", 0, "int", 0, "int", 0, "int", 32, "int", 32, "ptr", &AndMask, "ptr", &XorMask, "ptr")
         DllCall("SetSystemCursor", "ptr", CursorHandle, "int", SubStr(A_LoopField, 1, 5)) ; calls DestroyCursor
      }
   }
}
return

Esc::
{
RestoreCursors()

RestoreCursors()
{
	SPI_SETCURSORS := 0x57
	DllCall( "SystemParametersInfo", UInt,SPI_SETCURSORS, UInt,0, UInt,0, UInt,0 )
}
WinClose, ahk_exe {{{StartupEXE}}}
ExitApp
}

In theory it hides the mouse, and then when you press escape it brings the mouse back and then closes Demul.

Obviously if you aren't using Esc key you might need to change it and might need to but the Esc (or whatever key) and lower part in the Exit tab if exiting from pause menu - you will need to try that to find out.

This thread might be worth a read as it is a way of doing it across all platforms for all games and also works if you use a custom mouse image

Cheers

Link to comment
Share on other sites

Ok thx. The issue is if I launch Demul directly from LB I get no cursor. If I launch it from within an AHK from LB, no matter what I do, it still shows the cursor. Tried LB checkbox not 2 show, 2 dift nomousy programs...nothing will hide it. It has to be a LB thing bc in both instances I'm launching the exact same Demul. It's very odd...

Link to comment
Share on other sites

So did the above work for you or not or have you not tried it?

I load all my Demul stuff through AHK's in LaunchBox and Big Box and the mouse cursor is hidden across all games and platforms that use Demul (in total I have about 6 different versions of ahks for Demul based emulation for different systems and controllers etc and as I said all of them hide the mouse cursor, plus no mousy works for bringing it back for the one game that I actually need the damn cursor for.)

In the above ahk you will need to change the following line to close demul as at the moment it will close the launching ahk and not demul

WinClose, ahk_exe {{{StartupEXE}}}

to

WinClose, ahk_exe Demul.exe

This is assuming that you haven't renamed the Demul.exe for any reason - as I didn't know you were using an ahk to load it I use the generic shutdown rather than specific to the exe.

Does the mouse hide at all when you do the ahk launch? does maybe the AHK finish and close so LB thinks that the emulator has closed and therefore brings the mouse back? in which case the above in Running autohotkey tab might not work either - afraid I don't know about that as it is beyond my skill set and knowledge.

From what you say it sounds like it is linked more to your ahk rather than Demul or LaunchBox-but I could be completely wrong.

Anyway good luck with it

Link to comment
Share on other sites

  • 6 months later...
On 5/7/2021 at 10:30 AM, PiperCalls said:

Ok thx. The issue is if I launch Demul directly from LB I get no cursor. If I launch it from within an AHK from LB, no matter what I do, it still shows the cursor. Tried LB checkbox not 2 show, 2 dift nomousy programs...nothing will hide it. It has to be a LB thing bc in both instances I'm launching the exact same Demul. It's very odd...

I have the exact same problem, I was configuring LB to launch my Lightgun games, but whenever I launch a game in Demul using nomousy to hide the cursor it does not work and the damn cursor is always there :(

Link to comment
Share on other sites

7 hours ago, exodus_cl said:

I have the exact same problem, I was configuring LB to launch my Lightgun games, but whenever I launch a game in Demul using nomousy to hide the cursor it does not work and the gosh darn cursor is always there

Try a process of elimination.

  • Open LaunchBox and select (not launch) one of your Demul games in question.
  • Now open the Windows Command window to where your nomousy.exe is located and type in "nomousy /hide" and press Enter.  You should now be mouse-pointer-less.
  • Alt-Tab back to LaunchBox and press Ctrl+P to play/launch the game (since you can't see the mouse to point and double-click).
  • Is the mouse pointer showing?
  • Exit the game.
  • Assuming you're still "mouse-pointer-less", Alt-Tab to the command window and type "nomousy" and press Enter to restore it.  

If that produced the desired outcome, then you know nomousy will work.  It's then a matter of telling it how/where/when to run "nomousy /hide" and "nomousy".

If that didn't work, then it's onto the next step(s).  (whatever they may be)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...