Skip to content

Commit

Permalink
feat: add hidpi support
Browse files Browse the repository at this point in the history
otherwise if there's a monitor with 125% and another with 100% zoom,
Stellate would get clipped on the 100% one
  • Loading branch information
ajitid committed Aug 13, 2024
1 parent f897063 commit e656dc1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ func main() {
Setting `FlagWindowHidden` before `InitWindow()` so that the window doesn't flashes (appears then quickly hides itself on start)
Setting the rest in `SetWindowState()` as not every flag is configurable before window creation, see https://github.com/raysan5/raylib/issues/1367#issue-690893773
*/
rl.SetConfigFlags(rl.FlagWindowHidden | rl.FlagWindowTransparent | rl.FlagMsaa4xHint | rl.FlagVsyncHint)
rl.InitWindow(WinWidth, WinHeight, "stellate")
defer rl.CloseWindow()
/*
I don't know if I _need_ HiDPI flag or not, see:
more info about HiDPI
https://github.com/raysan5/raylib/discussions/2999
https://www.reddit.com/r/raylib/comments/o3k27c/macos_fix_high_dpi_blurry_window/
*/
rl.SetConfigFlags(rl.FlagWindowHidden | rl.FlagWindowTransparent | rl.FlagMsaa4xHint | rl.FlagVsyncHint | rl.FlagWindowHighdpi)
rl.InitWindow(WinWidth, WinHeight, "stellate")
defer rl.CloseWindow()
rl.SetWindowState(rl.FlagWindowUndecorated | rl.FlagWindowTopmost | rl.FlagWindowUnfocused)

// hide window from showing up in the taskbar whenever `rl.FlagWindowHidden` flag is cleared
Expand Down

0 comments on commit e656dc1

Please sign in to comment.