mihaip / infinite-mac

A classic Mac loaded with everything you'd want
https://infinitemac.org
Apache License 2.0
1.16k stars 68 forks source link

Is there a way to lock the mouse within the emulator window? #326

Open Shogun38 opened 1 month ago

Shogun38 commented 1 month ago

I'm trying to play shufflepuck and its tough because whenever the mouse hits the edge of the emulator window it goes off into the browser. I've messed with hitting ctrl f5 but that didn't help so I don't think its used for this purpose (I've only used it to fix the mouse in Dark Forces).

This is probably an issue in any browser screen so I'm not sure if there is some browser functionality that can lock the mouse to the emulator screen. I'm using Chrome/Edge. Thanks! Mouse issue

mihaip commented 1 month ago

Have you tried enabling the "Use relative mouse movements" option in the emulator settings? As a side effect of that, when clicking into the window, mouse lock will be enabled.

that-ben commented 1 month ago

On a side note, Mini vMac (select System 6 on the InfiniteMac site) is much more suitable for B&W Mac games like Shufflepuck, compared to SheepShaver (Mac OS 8/9).

Shogun38 commented 1 month ago

Have you tried enabling the "Use relative mouse movements" option in the emulator settings? As a side effect of that, when clicking into the window, mouse lock will be enabled.

I thought thats what ctrl-f5 did so thanks for pointing that out. This setting works great in 9.0. However in 6.0 (I'm guessing in all Basilisk II) the setting doesn't exist. In addition I think there is a bug when "use relative mouse movements" was enabled in 9.0 and then you exit out and go launch 6.0 when you click in the window the mouse freezes. I had to go back to the 9.0 instance, disable relative mouse movements, and then the mouse worked normally in 6.0.

Steps to reproduce the mouse issue in Chrome/Edge: 1) Enable relative mouse movements in 9.0 2) Click home 3) Launch 6.0 instance (or any Basilisk II) 4) Click within the monitor area and the mouse freezes 5) Hit esc to regain control

that-ben commented 1 month ago

Ah, yes. Mouse hardware acceleration ("use relative mouse movements") is a SheepShaver/BasiliskII thing, not a Mini vMac thing unfortunately. True.

mihaip commented 1 month ago

@Shogun38 thanks for noticing that bug when switching, should be fixed with 3281685511a0703bb14250c915de20de3b528fb2.