moonlight-stream / moonlight-qt

GameStream client for PCs (Windows, Mac, Linux, and Steam Link)
GNU General Public License v3.0
10.72k stars 628 forks source link

Pen pressure function and Thank you very much #1247

Open TangXiaoLin-CN opened 7 months ago

TangXiaoLin-CN commented 7 months ago

Moonlight-Sunshine 10-point multi-touch feature is really great. I never thought I'd be using a high-performance Windows desktop with a touch gesture on a handheld device. I'm using a Surface pro 7 10-point touch tablet computer and it works very well. As of today, I have uninstalled all the GFE that I have used before because of this overwhelming function

Additionally... Is it possible to support the pressure sensing pen function? If this is supported, I believe it will be an innovative program in the field of graphics works. (especially 3D graphics)

Anyway, this 5.0 version update is another life-changing opportunity for me. Thank you so much.

Andres-3DArtist commented 6 months ago

Yeah please, I'm 3D artist and I'm looking forward to be able to use my main workspace remotely with Zbrush or Substance painter. Being able to use a Wacom from the client pc or Apple/Samsung/Xiaomi pencil would be awesome.

That would be a life changing

TangXiaoLin-CN commented 6 months ago

Yeah please, I'm 3D artist and I'm looking forward to be able to use my main workspace remotely with Zbrush or Substance painter. Being able to use a Wacom from the client pc or Apple/Samsung/Xiaomi pencil would be awesome.

That would be a life changing

I downloaded and view code of moonlight, I find it support pen pressure function. but it is not compiled to latest release. And I find moonlight cant do more, because SDL2 just surpport pen pressure.SDL2 cant surpport pen float on screen surface as a mouse. It mean pen cant normal works on windows,except moonlight to improve it or upgrade to SDL3.

Andres-3DArtist commented 6 months ago

And do you think it'd be possible to update to SLD3? I mean, if we can have hope hahaha

TangXiaoLin-CN commented 6 months ago

And do you think it'd be possible to update to SLD3? I mean, if we can have hope hahaha

hahah,I personally hope it is possible very much.But it is diffcult after I know status of SDL3. SDL3 is review now, and it has a lot of changed,therefore upgrade project may is complex and need much time.

reletively,to individually changed SDL2's code for adapt windows' pen pressure is easy, but this is not conducive to upgrade SDL3.

however, official version of SDL3 will be publish in furture, project upgrade also is inevitable. We just need wait and hope.

cgutman commented 6 months ago

Yes, the problem is that SDL doesn't expose pen pressure until SDL 3 (which isn't yet released). Someone posted a WIP PR that converts Moonlight to SDL 3 (https://github.com/moonlight-stream/moonlight-qt/pull/1182) but it's probably outdated now since SDL3 is still making breaking changes.

Once SDL 3 is officially released and Moonlight has been updated to support it, the actual changes to support pen pressure are trivial.

TangXiaoLin-CN commented 6 months ago

Yes, the problem is that SDL doesn't expose pen pressure until SDL 3 (which isn't yet released). Someone posted a WIP PR that converts Moonlight to SDL 3 (https://github.com/moonlight-stream/moonlight-qt/pull/1182) but it's probably outdated now since SDL3 is still making breaking changes.

Once SDL 3 is officially released and Moonlight has been updated to support it, the actual changes to support pen pressure are trivial.

Thank you for your reply and hard work.

gschintgen commented 5 months ago

This issue has me wondering: Is a digital pen / stylus currently supposed to work correctly with absolute coordinates? (Pressure sensitivity would be a luxury at this point...)

Currently my Wacom stylus (integrated into a Thinkpad Yoga S1) is working perfectly fine locally, but if I use that Thinkpad as Moonlight client to my Sunshine host, the host only receives relative mouse movement packets from the pen. I.e. if I lift the pen so that it's no longer detected as hovering and then bring it near the screen again that new absolute position is not transmitted to Sunshine.

Is that expected?

(That is with moonlight 5.0.1, but since the release notes for 6.0 don't mention anything pen related I wouldn't expect changes. Host and client are Ubuntu 22.04.)

Lucalme commented 1 month ago

@gschintgen

This issue has me wondering: Is a digital pen / stylus currently supposed to work correctly with absolute coordinates? (Pressure sensitivity would be a luxury at this point...)

Currently my Wacom stylus (integrated into a Thinkpad Yoga S1) is working perfectly fine locally, but if I use that Thinkpad as Moonlight client to my Sunshine host, the host only receives relative mouse movement packets from the pen. I.e. if I lift the pen so that it's no longer detected as hovering and then bring it near the screen again that new absolute position is not transmitted to Sunshine.

Is that expected?

(That is with moonlight 5.0.1, but since the release notes for 6.0 don't mention anything pen related I wouldn't expect changes. Host and client are Ubuntu 22.04.)

I'm on windows 11 on both client and host and have the exact same issue. Did you find a way to make it work?

gschintgen commented 1 month ago

I'm on windows 11 on both client and host and have the exact same issue. Did you find a way to make it work?

No, it's not currently supported on PC as it seems: https://github.com/LizardByte/Sunshine/pull/2606#issuecomment-2172107978

I can confirm though that Samsung's S-Pen on a tablet (moonlight-android) is working indeed (host: Sunshine Linux), but I couldn't test it in-depth to check whether or not pressure sensitivity is working. (Caveat: the pen stutters heavily every 20-40 seconds if used via moonlight/sunshine; there is an issue about it that may have been closed prematurely. I'll have to properly test all of this sometime.)

Andres-3DArtist commented 1 month ago

I'm on windows 11 on both client and host and have the exact same issue. Did you find a way to make it work?

No, it's not currently supported on PC as it seems: LizardByte/Sunshine#2606 (comment)

I can confirm though that Samsung's S-Pen on a tablet (moonlight-android) is working indeed (host: Sunshine Linux), but I couldn't test it in-depth to check whether or not pressure sensitivity is working. (Caveat: the pen stutters heavily every 20-40 seconds if used via moonlight/sunshine; there is an issue about it that may have been closed prematurely. I'll have to properly test all of this sometime.)

I've tested it in my Samsung S9 Ultra and it's weird. I do have pen pressure in Photoshop but not in Zbrush

Lucalme commented 1 month ago

I'm on windows 11 on both client and host and have the exact same issue. Did you find a way to make it work?

No, it's not currently supported on PC as it seems: LizardByte/Sunshine#2606 (comment)

I can confirm though that Samsung's S-Pen on a tablet (moonlight-android) is working indeed (host: Sunshine Linux), but I couldn't test it in-depth to check whether or not pressure sensitivity is working. (Caveat: the pen stutters heavily every 20-40 seconds if used via moonlight/sunshine; there is an issue about it that may have been closed prematurely. I'll have to properly test all of this sometime.)

I'm wondering if it would be possible to write a transparent overlay with third party library (preferably linux and windows compatible) that would capture pen data and then transmit it to the app to send over network. Would have to look into code but seems it could be good temporary fix since SDL 3 is not yet stable.