diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-03-11 22:12:35 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-03-11 22:12:35 +0100 |
| commit | 2bd955903676822f6308516bdcb13cb0886fa0ef (patch) | |
| tree | 666b3e9a547cfb7032c03c380534f2564823a913 /src/unix/main_unix.cpp | |
| parent | 089f1d902c1f1c89b5b39fd3cf093313be3ebc7f (diff) | |
export working unix
Diffstat (limited to 'src/unix/main_unix.cpp')
| -rw-r--r-- | src/unix/main_unix.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/unix/main_unix.cpp b/src/unix/main_unix.cpp index 9dd9e62..08087b6 100644 --- a/src/unix/main_unix.cpp +++ b/src/unix/main_unix.cpp @@ -25,6 +25,7 @@ void ts_create_gui(int window_w, int window_h); void ts_load_images(); void ts_init(); +GLFWwindow* glfw_window; bool program_running = true; char config_path[MAX_INPUT_LENGTH]; @@ -62,8 +63,9 @@ static void glfw_error_callback(int error, const char* description) int main(int, char**) { glfwSetErrorCallback(glfw_error_callback); - if (!glfwInit()) + if (!glfwInit()) { return 1; + } ts_init(); @@ -95,6 +97,7 @@ int main(int, char**) if (window == nullptr) { return 1; } + glfw_window = window; glfwSetWindowSizeLimits(window, 800, 600, GLFW_DONT_CARE, GLFW_DONT_CARE); glfwMakeContextCurrent(window); @@ -165,7 +168,7 @@ bool ts_platform_dir_exists(utf8_int8_t* path) { } void ts_platform_set_window_title(utf8_int8_t* str) { - // TODO + glfwSetWindowTitle(glfw_window, str); } ts_file_content ts_platform_read_file(char *path, const char *mode) { |
