diff --git a/Makefile b/Makefile index 652e9133..3117460b 100644 --- a/Makefile +++ b/Makefile @@ -240,7 +240,7 @@ else ifeq ($(detected_OS),Linux) else ifeq ($(detected_OS),windows) $(CC) $(CFLAGS) $(WARNINGS) -I. $< -lgdi32 -o $@$(EXT) else ifeq ($(detected_OS),Darwin) - $(CC) $(CFLAGS) $(WARNINGS) -I. $< -framework Cocoa -o $@$(EXT) + $(CC) $(CFLAGS) $(WARNINGS) -I. $< -framework IOKit -framework Cocoa -o $@$(EXT) else $(CC) $(CFLAGS) $(WARNINGS) -I. $< $(LIBS) $(LINK_GL3) -o $@$(EXT) endif @@ -254,6 +254,7 @@ debug: all .$(OS_DIR)$$exe$(EXT); \ done + ./examples/icons/icons ./examples/silk/silk ./examples/gamepad/gamepad ./examples/first-person-camera/camera diff --git a/RGFW.h b/RGFW.h index 9b3c8bca..ff0d3388 100644 --- a/RGFW.h +++ b/RGFW.h @@ -253,6 +253,7 @@ int main() { #define RGFW_HEADER +#include #if !defined(u8) #ifdef RGFW_USE_INT /* optional for any system that might not have stdint.h */ typedef unsigned char u8; @@ -265,7 +266,6 @@ int main() { typedef signed long long i64; #else /* use stdint standard types instead of c ""standard"" types */ #include - #include typedef uint8_t u8; typedef int8_t i8; @@ -8157,15 +8157,6 @@ RGFW_window* RGFW_createWindowPtr(const char* name, RGFW_rect rect, RGFW_windowF } void RGFW_window_setBorder(RGFW_window* win, RGFW_bool border) { - /* weird hack thing */ - RGFW_window winSrc = *win; - { - if (!border && RGFW_window_isMaximized(win)) { - objc_msgSend_void_SEL(win->src.window, sel_registerName("toggleFullScreen:"), NULL); - } - } - *win = winSrc; - NSRect frame = ((NSRect(*)(id, SEL))abi_objc_msgSend_stret)((id)win->src.window, sel_registerName("frame")); NSRect content = ((NSRect(*)(id, SEL))abi_objc_msgSend_stret)((id)win->src.view, sel_registerName("frame")); float offset = 0; diff --git a/examples/basic/basic.c b/examples/basic/basic.c index ec7f9817..ae004dd9 100644 --- a/examples/basic/basic.c +++ b/examples/basic/basic.c @@ -31,7 +31,7 @@ RGFW_window* win2; int main(void) { RGFW_setClassName("RGFW Basic"); - RGFW_window* win = RGFW_createWindow("RGFW Example Window 刺猬", RGFW_RECT(500, 500, 500, 500), RGFW_windowAllowDND | RGFW_windowCenter | RGFW_windowNoBorder); + RGFW_window* win = RGFW_createWindow("RGFW Example Window 刺猬", RGFW_RECT(500, 500, 500, 500), RGFW_windowAllowDND | RGFW_windowCenter); RGFW_window_makeCurrent(win); RGFW_window_setIcon(win, icon, RGFW_AREA(3, 3), 4); diff --git a/examples/flags/flags.c b/examples/flags/flags.c index 4fb554d9..c83b22d9 100644 --- a/examples/flags/flags.c +++ b/examples/flags/flags.c @@ -3,7 +3,7 @@ #include "RGFW.h" int main(void) { - RGFW_window* win = RGFW_createWindow("RGFW icons", RGFW_RECT(0, 0, 600, 400), RGFW_windowAllowDND); + RGFW_window* win = RGFW_createWindow("RGFW flags", RGFW_RECT(0, 0, 600, 400), RGFW_windowAllowDND); while (RGFW_window_shouldClose(win) == RGFW_FALSE) { while (RGFW_window_checkEvent(win)) { @@ -30,7 +30,7 @@ int main(void) { printf("Allow Drops: %s\n", RGFW_window_allowsDND(win) ? "true" : "false"); RGFW_window_setDND(win, !RGFW_window_allowsDND(win)); break; - case RGFW_f: + case RGFW_t: printf("Mouse shown: %s\n", !RGFW_window_mouseHidden(win) ? "true" : "false"); RGFW_window_showMouse(win, RGFW_window_mouseHidden(win)); break; @@ -39,6 +39,9 @@ int main(void) { if (RGFW_window_isMaximized(win)) RGFW_window_restore(win); else RGFW_window_maximize(win); break; + case RGFW_f: + RGFW_window_fullscreen(win); + break; case RGFW_h: printf("Hidden: %s\n", RGFW_window_isHidden(win) ? "true" : "false"); if (RGFW_window_isHidden(win)) RGFW_window_show(win); diff --git a/examples/silk/silk.c b/examples/silk/silk.c index 7e2839d2..35e186b3 100644 --- a/examples/silk/silk.c +++ b/examples/silk/silk.c @@ -5,6 +5,7 @@ #include "silk.h" #include +#include typedef int8_t i8; typedef uint16_t u16;