Results 812 comments of Andre Weissflog

Yeah I have the same sorts of hacks for clipboard support on the web. When you look around in the code near the region I linked above, you'll see :D

No idea tbh (Android is basically a "tier 3 platform" for sokol_app.h, basic support is there, but personally I'm not all that invested in the platform). In general, sokol_app.h on...

Currently none of the desktop OS backends support the touch events. I'm curious, what is your use case, laptops with touch screen or gesture recognition via touchpad?

If WM_TOUCH is fundamentally compatible with the cross-platform low level touch events exposed by sokol_app.h (e.g. TOUCHES_BEGAN/MOVED/ENDED/CANCELLED) then it should be relatively easy. This doesn't include any sort of gesture...

I'll try to investigate, thanks for the hints!

Hmm, the incoming `WGPUSwapChainDescriptor` looks correct (usage, width, height) except for the `format` which is 0. ...I'm getting that pixel format via `wgpuSurfaceGetPreferredFormat`, maybe this returns zero when closure is...

I think I found the culprit... not sure yet why it happens. But: Closure-ized `wgpuSurfaceGetPreferredFormat` (https://github.com/emscripten-core/emscripten/blob/1311f2220ef70554d0862de4ebf637b1dab10025/src/library_webgpu.js#L2577-L2580) looks like this: ```js qa: ()=>{ var a = navigator.gpu.getPreferredCanvasFormat(); return ob[a] } ```...

Hmm, those string-to-number mapping objects all look the same, I assume those are all affected by the minification, but the `PreferredFormat` is just the first one that's encountered: https://github.com/emscripten-core/emscripten/blob/1311f2220ef70554d0862de4ebf637b1dab10025/src/library_webgpu.js#L317-L330 I...

Ok I give up. I haven't found a way so far sneaking those string-to-number mappings past Closure. Apparently there's an undocumented tag `/** @expose */`, and there's also an official...

Hmm, one solution is to turn the mapping into a function: ```js mapPreferredFormat: (fmt) => { switch (fmt) { case 'rgba8unorm': return 0x12; case 'bgra8unorm': return 0x17; } }, ```...