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

Disable SDL2 conversion of touch->mouse and mouse->touch on all platforms not just iOS/Android #176

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/plib/gnw/winmain.cc
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ int main(int argc, char* argv[])
{
int rc;

SDL_SetHint(SDL_HINT_MOUSE_TOUCH_EVENTS, "0");
SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");

#if _WIN32
GNW95_mutex = CreateMutexA(0, TRUE, "GNW95MUTEX");
if (GetLastError() != ERROR_SUCCESS) {
Expand All @@ -41,8 +44,6 @@ int main(int argc, char* argv[])
#endif

#if __APPLE__ && TARGET_OS_IOS
SDL_SetHint(SDL_HINT_MOUSE_TOUCH_EVENTS, "0");
SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");
chdir(iOSGetDocumentsPath());
#endif

Expand All @@ -53,8 +54,6 @@ int main(int argc, char* argv[])
#endif

#if __ANDROID__
SDL_SetHint(SDL_HINT_MOUSE_TOUCH_EVENTS, "0");
SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");
chdir(SDL_AndroidGetExternalStoragePath());
#endif

Expand Down