vc64web / virtualc64web

vc64web - Commodore C64 Emulator for iPad iPhone Android and the Web with CSDb access for thousands of demos at your fingertip.
https://vc64web.github.io/doc/about.html
GNU General Public License v3.0
46 stars 5 forks source link

Touch example crashes on touch devices #224

Closed JesperJuul closed 11 months ago

JesperJuul commented 11 months ago

It looks like recent versions have a bug in the touch code?

If I run https://vc64web.github.io/doc/wiki/player_example2.html either on my phone (Firefox or Chrome) or in Chrome for Windows, selecting developer tools and emulating a phone layout, I get the following error:

vc64_ui.js:3838 Uncaught ReferenceError: stationaryBase is not defined at register_v_joystick (vc64_ui.js:3838:29)

The emulator just shows "Exception thrown, see JavaScript console".

I tried defining stationaryBase, but that leads to a new error:

virtualjoystick.js:30 Uncaught ReferenceError: current_vjoy_touch is not defined at new VirtualJoystick (virtualjoystick.js:30:14)

Thank you for the great work.

mithrendal commented 11 months ago

touch control in general is working when invoking the stand alone version at https://vc64web.github.io

confirmed: when embedding vc64web in another web page with enabled virtual touch joystick then it crashes 🙈 ... investigating now

mithrendal commented 11 months ago

I think it is fixed now 🤓

@JesperJuul thanks for reporting

JesperJuul commented 11 months ago

Amazing, thank you @mithrendal!