Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken inputs in fullscreen with Touhou 06 - The Embodiment of Scarlet Devil #155

Open
Yuri-K7 opened this issue May 10, 2023 · 11 comments
Open
Labels
bug Something isn't working wine The issue is specifically related to features of wine.

Comments

@Yuri-K7
Copy link

Yuri-K7 commented May 10, 2023

When launching the game in fullscreen, the controls are broken, the main menu keeps scrolling down as if the down arrow was held, and then quit the game by itself.

This also happens with dxvk's d3d9. Indeed since Windows 10, the game is patched with a d3d8 to d3d9 dll to avoid running at abnormal speed (an issue only on Windows it seems), which is now enable with d8vk's d3d8 override.

This does not happen with wined3d.
This does not happen if the game is launched in windowed.

Software information

Touhou 06 - The Embodiment of Scarlet Devil

System information

  • GPU: intel UHD 620
  • Driver: Mesa 23.0.3
  • Wine version: wine-staging 8.7
  • D8VK version: 1.0
  • DXVK version: 2.1

Apitrace file(s)

th06e.trace.zip

Log files

Without d3d8 to d3d9 patch :

With the patch:

I guess I better should report this in dxvk upstream ? I still report this here as dxvk alone keeps the game running with wined3d, and the api trace is d3d8.

@WinterSnowfall
Copy link

This could be a high framerate issue if the game runs uncapped when in fullscreen. Try placing a dxvk.conf file next to the exe with d3d9.maxFrameRate = 60 and let us know if that helps in any way.

d3d9.presentInterval = 1 is also an option (it force-enables V-Sync), but the former is preferable, assuming it works.

@Yuri-K7
Copy link
Author

Yuri-K7 commented May 12, 2023

The game is already locked at display's framerate in fullscreen, first variable reduce by half the scrolling (my display is 120Hz) and the second one doesn't change anything. The inputs are still broken. I tried in both d3d8 and with the d3d9 patch, and got the same results.

I think the game is patch to allow higher framerate in fullscreen than the 60 fps of the unpatch game, as replays are broken when not in 60Hz.

What you describe thou is clearly similar to the windows 10 bug, the game were running at an inhuman speed in fullscreen, which was worked around with the d3d8 to d3d9 patch, but it was still controllable. I downloaded the game again to check, and the english patched version you can find online is indeed bundled with it.
https://en.touhouwiki.net/wiki/Game_Tools_and_Modifications#DX8_to_DX9_converter

@WinterSnowfall
Copy link

WinterSnowfall commented May 12, 2023

The general idea here is that d8vk/dxvk does not interact with keyboard inputs in any way, so if you have issues with those in any game it's something else at play. I have had similar problems with some games that were compositor related and were sorted by running the game in a virtual desktop in Wine. Have you tried to do that?

If it works fine when windowed with d8vk, then it's mostly a matter of finding out what your compositor is doing different than the game when in full-screen. Usually the differences are V-Sync related.

@AlpyneDreams AlpyneDreams added the bug Something isn't working label May 16, 2023
@Yuri-K7
Copy link
Author

Yuri-K7 commented May 18, 2023

Weirdly enough using wine virtual desktop the bug still occurs, but differently, it launches and freeze with a white screen, and the moment I click on the window, the game automatically quits itself.

I understand this a quite delicate bug that is most likely related to the compositor, but what is bothering me is that it doesn't happened with wined3d... is what I would say, but actually alt-tabbing the game and alt-tabbing again to return to it triggers the same bug...

@WinterSnowfall
Copy link

There are some differences between how WineD3D and dxvk/d8vk handle window signaling, but the topic is a can of worms to be honest.

Latest Wine versions are also a bit unstable in that regard, for example Scrapland Remastered is broken and will show a black screen when starting a game ever since 8.x+ even with WineD3D, although it used to work just fine in 7.x. With WineD3D you can force it to render by alt+tabbing out and back in, while with d8vk that is not possible (most likely because of the differences I mentioned above).

It would be interesting to know if rolling back to an older version of Wine does anything in this case.

@Yuri-K7
Copy link
Author

Yuri-K7 commented May 18, 2023

I just tested with wine 7.12 and the bug still occurs with dxvk/d8vk and with alt-tabbing wined3d, thou the menu scrolling pattern is slightly different.
I guess this is more of a wine bug that just occurs immediately with dxvk/d8vk.

@AlpyneDreams AlpyneDreams added the wine The issue is specifically related to features of wine. label Jul 4, 2023
@netborg-afps
Copy link

You can check with wine 8.11-staging again, which had an input fix I initiated.

@Yuri-K7
Copy link
Author

Yuri-K7 commented Jul 12, 2023

You can check with wine 8.11-staging again, which had an input fix I initiated.

still occurs with wine 8.12-staging

@Yuri-K7
Copy link
Author

Yuri-K7 commented Sep 9, 2023

Still occurs with wine 8.15 staging, I forgot to mention I filled a wine issue https://bugs.winehq.org/show_bug.cgi?id=55336

@Yuri-K7
Copy link
Author

Yuri-K7 commented Jul 31, 2024

The x11 alt-tabbing issue and the DXVK fullscreen issue seems different, as explained in the winehq bug report.

@Yuri-K7
Copy link
Author

Yuri-K7 commented Aug 1, 2024

Somehow when dinput creates the keyboard device, the game window is not the foreground window, and then dinput decide to not start the input thread. It doesn't happen with wined3d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wine The issue is specifically related to features of wine.
Projects
None yet
Development

No branches or pull requests

4 participants