#jsmess 2017-05-16,Tue

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)

WhoWhatWhen
Vito`db48x: does emscripten not initialize gamepads on its own?
I notice emularity sets up two listeners for them
[00:47]
baiI think emularity mainly does that to offer some indicator of whether the gamepads are available or not, I'm pretty sure that you don't need to do anything special in the js to make emscripten sdl apps handle gamepads [00:54]
............... (idle for 1h12mn)
db48xwithout those listeners it generally doesn't work [02:06]
baihmm, actually now that you mention it I do seem to remember a firefox bug about that yeah [02:07]
db48xwhether that's due to a bug in Emscripten, MAME, or what I couldn't tell you [02:08]
baiwhere certain things wouldn't show up if you didn't register events first [02:08]
db48xyea [02:08]
baiI want to say that's fixed by now but with only a vague recollection I can't really say for sure [02:08]
db48xalthough that might be a deliberate decision here, in the gamepad spec [02:08]
baithere's the requirement about pushing a button before the gamepads will show up, yeah [02:09]
***phe has quit IRC (Quit: Leaving) [02:11]
db48xeven if you press a button, the page doesn't get any information about the gamepads unless it has a gamepadconnected listener [02:12]
baiah, yeah actually maybe that explains why I never had to worry about it with my own loader, because I was using it with the 3d engine which already registered handlers for that [02:13]
db48xpresumably that listener would be added when the program calls in to Emscripten's SDL port. Maybe MAME doesn't call it, or maybe Emscripten doesn't set up the listener
in any case, adding it ourselves is easyier than figuring that out, and anyway it lets the user turn on the gamepad a few seconds earlier
[02:14]
baiyeah, you'd think so. computers are hard :D [02:15]
db48xindeed
that said, Emularity presents absolutely no UI about the gamepads at all
[02:16]
Vito`so I need to set up the listeners
then hit the button
_then_ run the emscripten code?
[02:28]
baiI'm *pretty* sure that emscripten and mame and dosbox all handle gamepads being connected after they've launched
so you don't have to wayt for a button press to launch them
wait*
[02:33]
Vito`https://icculus.org/~icculus/testjoystick-emscripten/ suggests otherwise
that's the SDL2 joystick test and it doesn't seem to do anything at all
[02:39]
baihmm. it might be up to the app to implement polling and handle newly-attached gamepads...I dunno, this is deeper than I've had to dig into it so I really can't say
for me it's mostly Just Worked(tm) with mame and dosbox, but I haven't done much outside of those two
[02:41]
Vito`mame and dosbox using emularity, though, right? [02:42]
baiI've used them outside of emularity too [02:42]
Vito`but only in your framework that also sets up those listeners [02:42]
baiwell....pretty sure I also had some simple 2d versions going with my loader as well, which ran outside of the engine....but that was a long time ago that I really played around with it at that level
I know I'm not being very useful here :D
[02:44]
db48xyou don't have to wait for the user to press a button on the gamepad before running the program [02:45]
Vito`is there a way to restart an emscripten program
I think this just runs immediately and exits
[02:50]
baiyeah, that's what I was trying to figure out too, I think that's exactly what it does
you can re-run the same app yes, I think you just call Module.start() or .run()?
[02:51]
Vito`Module.run() doesn't seem to do anything [02:52]
bainah it's probably more complicated than that
yeah
I know I could reuse mame instances and just re-run them with different arguments to get the new games to boot
let me see if I still have code that does that
[02:52]
maybe it worked because I was using modules...I think if you just reload the emscripten file which defines the module it'll reset everything and you can run again...but there's probably a better way [03:00]
Vito`I can't seem to reliably get this app to detect joysticks
even with the listeners added
maybe 50% of the time it works
[03:09]
.... (idle for 19mn)
I'm getting faster with the button press and it's more reliable then [03:28]
baiyou can make a game out of it. who said web gaming wasn't fun? [03:29]
SketchCowMaybe he's not here, but the guy who was THE joystick guy was here [03:34]
bailuser? [03:34]
SketchCowTorrenting the CHDs for MAME has been a beeeoth [03:34]
***SketchCow sets mode: +oooo arkiver bai balrog db48x
SketchCow sets mode: +oooo devesine_ DFJustin godane jvilk_
[03:35]
SketchCowTed Mielczarek
I just asked him to come here.
current emulation things I'm doing -
- Arranged ANOTHER set of amazing Apple II old stuff grabs
- Continue to remove doubled Apple II items in the collection, by hash
- Ripping Apple II floppies from one of the remaining bins
- Screengrabbing mac stuff as Stephen adds them
- gently stand over db48x smiling gently
[03:36]
............................................... (idle for 3h52mn)
***datajerk has quit IRC (Read error: Operation timed out)
datajerk has joined #jsmess
[07:31]
............................ (idle for 2h15mn)
ted______sorry i was sleeping
Vito`: that testjoystick.c doesn't seem to actually handle a device being added after the fact?
like SDL_JOYDEVICEADDED
it wants to find a device connected on startup and then use that
[09:50]
............ (idle for 55mn)
***phe has joined #jsmess [10:47]
ted______SketchCow: FTR, I am on another IRC channel with vito where i don't just idle 24/7 :) [10:49]
...................................................... (idle for 4h26mn)
SketchCowA hah
Just being sure, as usual
[15:15]

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)