Skip to content

Commit

Permalink
Automatically assign TextInputEXT.WindowHandle
Browse files Browse the repository at this point in the history
  • Loading branch information
flibitijibibo committed Oct 1, 2024
1 parent 1576658 commit 9debca4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/FNAPlatform/SDL2_FNAPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,11 @@ public static void DisposeWindow(GameWindow window)
TouchPanel.WindowHandle = IntPtr.Zero;
}

if (TextInputEXT.WindowHandle == window.Handle)
{
TextInputEXT.WindowHandle = IntPtr.Zero;
}

SDL.SDL_DestroyWindow(window.Handle);
}

Expand Down
5 changes: 5 additions & 0 deletions src/FNAPlatform/SDL3_FNAPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,11 @@ public static void DisposeWindow(GameWindow window)
TouchPanel.WindowHandle = IntPtr.Zero;
}

if (TextInputEXT.WindowHandle == window.Handle)
{
TextInputEXT.WindowHandle = IntPtr.Zero;
}

SDL.SDL_DestroyWindow(window.Handle);
}

Expand Down
1 change: 1 addition & 0 deletions src/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ public Game()
Window = FNAPlatform.CreateWindow();
Mouse.WindowHandle = Window.Handle;
TouchPanel.WindowHandle = Window.Handle;
TextInputEXT.WindowHandle = Window.Handle;

FrameworkDispatcher.Update();

Expand Down

0 comments on commit 9debca4

Please sign in to comment.