-
Notifications
You must be signed in to change notification settings - Fork 87
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing this, up-to-date SDL support is very useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool, SDL2 is probably our best path forward for native Wayland support. I noted a few suggestions.
Address above reviews |
Addressed comments |
I had to apply the following patch to get it to compile: diff --git a/source/Irrlicht/COpenGLCommon.h b/source/Irrlicht/COpenGLCommon.h
index d8ecc2e..eff48b6 100644
--- a/source/Irrlicht/COpenGLCommon.h
+++ b/source/Irrlicht/COpenGLCommon.h
@@ -41,8 +41,12 @@
#define GL_GLEXT_PROTOTYPES 1
#define GLX_GLXEXT_PROTOTYPES 1
#endif
- #include <SDL/SDL_video.h>
- #include <SDL/SDL_opengl.h>
+ #include <SDL2/SDL_video.h>
+ #include <SDL2/SDL_opengl.h>
+ #include <GL/gl.h>
+ #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
+ #include <GL/glext.h>
+ #endif^M
#else
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#define GL_GLEXT_LEGACY 1 After that I'm able to launch Minetest, however there are some issues:
|
Thanks for testing. I do not readily have a linux system, so testing on it skipped me. The header and keys issues should be fixed. I'm unable to test the mouse issue on wayland since wayland is not supported on the system I got to test linux. |
It looks like the issue is that Minetest just hides the cursor then warps it back to the center of the window on every frame. Wayland doesn't let you warp the cursor, you have to lock the cursor to the window use relative mouse motion instead (which I remember seeing similar issues before on other platforms (I think it sometimes happened on Windows?) so it's something that we should fix, but fixing it involves making changes to Minetest's mouse handling, so it wouldn't be a part of this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unicode input doesn't work, the clipboard is nonfunctional and I doubt this runs on Windows due to the SDL_main mechanism, but it's a start.
I'll merge this later.
Glad to see something going through. I still do want to use SDL2 for everything if possible, so I'll likely work on this myself sometime. |
This updates the sdl version CIrrDeviceSDL uses from 1.2 to 2.0. Also, the compiler config header now allows building with only sdl device on windows, x11 and osx.