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

goldsource mouse input #29

Merged
merged 2 commits into from
Dec 3, 2017
Merged

Conversation

FreeSlave
Copy link
Member

@FreeSlave FreeSlave commented Dec 3, 2017

Add a cmake flag to use goldsource compatible mouse input. This flag means that input_goldsource.cpp will be used instead of input_xash3d.cpp.
The resulting client seems to work on both xash3d and goldsource, on Windows and Linux.
Some possible improvements:

  1. Probably we could detect if the current engine is xash3d and use input_xash3d code even if the client was built to be goldsource compatible. What is the reliable way to check if the engine is xash3d?
  2. Currently I made windows code to not use SDL2 in order to support the old goldsource versions without SDL2. I did not bring back the old windows-specific joystick support though. I don't have a joystick and can't check it anyway.
  3. What is the 'official' way to build this sdk with msvc? Because I changed only CMakeLists.txt and use my own script to produce windows binary.

Changes to goldsource input are based on this PR to original halflife repo. ValveSoftware/halflife#1559

This does not solve the issue with black screen on fullscreen (observable at least on Linux gs).

@FreeSlave
Copy link
Member Author

FreeSlave commented Dec 3, 2017

Now input backend is chosen depending on the engine running.
One still needs to set a flag GOLDSOURCE_SUPPORT for cmake. This is to avoid dependence on SDL2 when unnecessary.

@a1batross
Copy link
Member

Well, nice! It's finally done. :)

Merging. (OSX GCC job was stuck, but Clang succeeded).

@a1batross a1batross merged commit 03c2571 into FWGS:master Dec 3, 2017
@FreeSlave
Copy link
Member Author

@a1batross we also need to bring back the non-SDL joystick support. If you have joystick, you can try.
Also I'm not sure about all this m_bMouseThread thing in PR to original halflife repo, so I left it disabled.
Probably mouse on windows is not worked as intended for now.

@FreeSlave FreeSlave deleted the mouse_goldsource branch December 9, 2017 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants