Skip to content

Commit

Permalink
Hide the OS cursor in fullscreen. Fixes #232.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennwc committed May 18, 2021
1 parent 1d5a024 commit ec3e333
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/video_sdl.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,20 +161,23 @@ func setFullScreenMode(size types.Size, pos image.Point) {
noxWindow.SetBordered(false)
setWindowRect(size, pos)
noxWindow.SetFullscreen(sdl.WINDOW_FULLSCREEN_DESKTOP)
sdl.ShowCursor(sdl.DISABLE)
}

func setFullScreenBorderlessMode(size types.Size, pos image.Point) {
noxWindow.SetFullscreen(0)
noxWindow.SetResizable(false)
noxWindow.SetBordered(true)
setWindowRect(size, pos)
sdl.ShowCursor(sdl.DISABLE)
}

func setWindowedMode(size types.Size, pos image.Point) {
noxWindow.SetFullscreen(0)
noxWindow.SetResizable(true)
noxWindow.SetBordered(true)
setWindowRect(size, pos)
sdl.ShowCursor(sdl.ENABLE)
}

func getDisplayDim() (r [4]int) {
Expand Down

0 comments on commit ec3e333

Please sign in to comment.