Remove command-line options from tearing test
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 2e7e49b..97da468 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -35,7 +35,7 @@
add_executable(inputlag WIN32 MACOSX_BUNDLE inputlag.c ${GETOPT} ${GLAD_GL})
add_executable(joysticks WIN32 MACOSX_BUNDLE joysticks.c ${GLAD_GL})
add_executable(opacity WIN32 MACOSX_BUNDLE opacity.c ${GLAD_GL})
-add_executable(tearing WIN32 MACOSX_BUNDLE tearing.c ${GETOPT} ${GLAD_GL})
+add_executable(tearing WIN32 MACOSX_BUNDLE tearing.c ${GLAD_GL})
add_executable(threads WIN32 MACOSX_BUNDLE threads.c ${TINYCTHREAD} ${GLAD_GL})
add_executable(timeout WIN32 MACOSX_BUNDLE timeout.c ${GLAD_GL})
add_executable(title WIN32 MACOSX_BUNDLE title.c ${GLAD_GL})
diff --git a/tests/tearing.c b/tests/tearing.c
index 63b1bb1..8b28d39 100644
--- a/tests/tearing.c
+++ b/tests/tearing.c
@@ -35,7 +35,6 @@
#include <stdlib.h>
#include <math.h>
-#include "getopt.h"
#include "linmath.h"
static const struct
@@ -163,8 +162,6 @@
int main(int argc, char** argv)
{
unsigned long frame_count = 0;
- GLFWmonitor* monitor = NULL;
- int ch, width, height;
double last_time, current_time;
GLFWwindow* window;
GLuint vertex_buffer, vertex_shader, fragment_shader, program;
@@ -175,46 +172,10 @@
if (!glfwInit())
exit(EXIT_FAILURE);
- while ((ch = getopt(argc, argv, "hf")) != -1)
- {
- switch (ch)
- {
- case 'h':
- usage();
- exit(EXIT_SUCCESS);
-
- case 'f':
- monitor = glfwGetPrimaryMonitor();
- break;
-
- default:
- usage();
- exit(EXIT_FAILURE);
- }
- }
-
- if (monitor)
- {
- const GLFWvidmode* mode = glfwGetVideoMode(monitor);
-
- glfwWindowHint(GLFW_REFRESH_RATE, mode->refreshRate);
- glfwWindowHint(GLFW_RED_BITS, mode->redBits);
- glfwWindowHint(GLFW_GREEN_BITS, mode->greenBits);
- glfwWindowHint(GLFW_BLUE_BITS, mode->blueBits);
-
- width = mode->width;
- height = mode->height;
- }
- else
- {
- width = 640;
- height = 480;
- }
-
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
- window = glfwCreateWindow(width, height, "Tearing detector", monitor, NULL);
+ window = glfwCreateWindow(640, 480, "Tearing detector", NULL, NULL);
if (!window)
{
glfwTerminate();