Skip to content

Commit

Permalink
__Fullscreen Support
Browse files Browse the repository at this point in the history
  • Loading branch information
tobid7vx committed Oct 16, 2022
1 parent b1cf387 commit c9a817e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/NImGui/NImGui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ namespace NImGui
void SetVsync(bool vs);
bool GetVsync();
void LoadIcon(std::string path);
void SetFullScreen(bool fsc);

//Input
bool IsKeyDown(KeyCode keycode);
Expand Down
7 changes: 7 additions & 0 deletions source/NImGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,11 @@ namespace NImGui
glfwSetWindowIcon(win, 1, img);
stbi_image_free(img->pixels);
}

void App::SetFullScreen(bool fsc)
{
GLFWmonitor *mw = glfwGetPrimaryMonitor();
const GLFWvidmode * vm = glfwGetVideoMode(mw);
glfwSetWindowMonitor(win, mw, 0, 0, vm->width, vm->height, vm->refreshRate);
}
}

0 comments on commit c9a817e

Please sign in to comment.