mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[client] displayserver: add new earlyInit
to the interface
Some platforms such as Wayland need to set environment vairables before SDL is initialized, as such this change detects the display server before SDL has started and calls the new `earlyInit` method providing the implementation an opportunity to set things up.
This commit is contained in:
@@ -33,6 +33,11 @@ struct SDLDSState
|
||||
|
||||
static struct SDLDSState sdl;
|
||||
|
||||
static bool sdlEarlyInit(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static void sdlInit(SDL_SysWMinfo * info)
|
||||
{
|
||||
memset(&sdl, 0, sizeof(sdl));
|
||||
@@ -143,6 +148,7 @@ static void sdlWarpMouse(int x, int y, bool exiting)
|
||||
struct LG_DisplayServerOps LGDS_SDL =
|
||||
{
|
||||
.subsystem = SDL_SYSWM_UNKNOWN,
|
||||
.earlyInit = sdlEarlyInit,
|
||||
.init = sdlInit,
|
||||
.startup = sdlStartup,
|
||||
.shutdown = sdlShutdown,
|
||||
|
Reference in New Issue
Block a user