Skip to content

Commit

Permalink
fix bug with GetCurrentMonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
ColleagueRiley committed Jul 8, 2024
1 parent 96f8e3c commit 29f58d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/platforms/rcore_desktop_rgfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,16 +564,16 @@ int GetMonitorCount(void)
// Get number of monitors
int GetCurrentMonitor(void)
{
int current = 0;
RGFW_monitor *mons = RGFW_getMonitors();
RGFW_monitor mon = RGFW_window_getMonitor(platform.window);

for (int i = 0; i < 6; i++)
{
if ((mons[i].rect.x == mon.rect.x) && (mons[i].rect.y == mon.rect.y)) current = i;
if ((mons[i].rect.x == mon.rect.x) && (mons[i].rect.y == mon.rect.y))
return i;
}

return current;
return 0;
}

// Get selected monitor position
Expand Down

0 comments on commit 29f58d9

Please sign in to comment.