mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Added full screen option to events test.
This commit is contained in:
parent
9c15e2ff86
commit
7dd8770e6f
@ -39,6 +39,8 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
|
#include "getopt.h"
|
||||||
|
|
||||||
// These must match the input mode defaults
|
// These must match the input mode defaults
|
||||||
static GLboolean closeable = GL_TRUE;
|
static GLboolean closeable = GL_TRUE;
|
||||||
|
|
||||||
@ -406,10 +408,11 @@ void monitor_callback(GLFWmonitor* monitor, int event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
GLFWwindow* window;
|
GLFWwindow* window;
|
||||||
int width, height;
|
GLFWmonitor* monitor = NULL;
|
||||||
|
int ch, width, height;
|
||||||
|
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
|
|
||||||
@ -420,7 +423,17 @@ int main(void)
|
|||||||
|
|
||||||
printf("Library initialized\n");
|
printf("Library initialized\n");
|
||||||
|
|
||||||
window = glfwCreateWindow(640, 480, "Event Linter", NULL, NULL);
|
while ((ch = getopt(argc, argv, "f")) != -1)
|
||||||
|
{
|
||||||
|
switch (ch)
|
||||||
|
{
|
||||||
|
case 'f':
|
||||||
|
monitor = glfwGetPrimaryMonitor();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window = glfwCreateWindow(640, 480, "Event Linter", monitor, NULL);
|
||||||
if (!window)
|
if (!window)
|
||||||
{
|
{
|
||||||
glfwTerminate();
|
glfwTerminate();
|
||||||
|
Loading…
Reference in New Issue
Block a user