mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 03:45:46 +01:00
remove needless inline function from main.c
this is shorter, does the same, and this was an incorrect application of `inline`.
This commit is contained in:
17
src/main.c
17
src/main.c
@@ -21,26 +21,21 @@ static void error_callback(int err, const char *const msg) {
|
|||||||
error("glfw returned (%i); \"%s\"", err, msg);
|
error("glfw returned (%i); \"%s\"", err, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int init(void) {
|
|
||||||
glfwSetErrorCallback(error_callback);
|
|
||||||
glfwInitHint(GLFW_JOYSTICK_HAT_BUTTONS, GLFW_FALSE); // disable joystick buttons
|
|
||||||
|
|
||||||
if (!glfwInit()) return 1; // initialize GLFW
|
|
||||||
if (window_init()) return 1;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void quit(void) {
|
static void quit(void) {
|
||||||
glfwTerminate();
|
glfwTerminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Entry-point of the application. */
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
(void)argc, (void)argv;
|
(void)argc, (void)argv;
|
||||||
printf("debug: [DBG], info: [INF], warning: [WAR], error: [ERR], fatal: [FAT]\n");
|
printf("debug: [DBG], info: [INF], warning: [WAR], error: [ERR], fatal: [FAT]\n");
|
||||||
atexit(quit);
|
atexit(quit);
|
||||||
if (init()) fatal("failed to initialize!");
|
|
||||||
|
glfwSetErrorCallback(error_callback);
|
||||||
|
glfwInitHint(GLFW_JOYSTICK_HAT_BUTTONS, GLFW_FALSE); // disable joystick buttons; since we won't need them
|
||||||
|
if (!glfwInit() || window_init())
|
||||||
|
fatal("failed to initialise!");
|
||||||
|
|
||||||
window_loop();
|
window_loop();
|
||||||
quit();
|
quit();
|
||||||
|
|||||||
Reference in New Issue
Block a user