diff --git a/Makefile b/Makefile index b7caebcc..e8aed319 100644 --- a/Makefile +++ b/Makefile @@ -668,7 +668,12 @@ ifeq ($(WINDOWS_BUILD),1) # fixes compilation in MXE on Linux and WSL OBJCOPY := objcopy OBJDUMP := $(CROSS)objdump else ifeq ($(OSX_BUILD),1) - CPP := cpp-9 -P + OSX_GCC_VER = $(shell find `brew --prefix`/bin/gcc* | grep -oE '[[:digit:]]+' | sort -n | uniq | tail -1) + # if we couldn't find a gcc ver, default to 9 + ifeq ($(OSX_GCC_VER),) + OSX_GCC_VER = 9 + endif + CPP := cpp-$(OSX_GCC_VER) -P OBJDUMP := i686-w64-mingw32-objdump OBJCOPY := i686-w64-mingw32-objcopy else ifeq ($(TARGET_N64),0) # Linux & other builds @@ -749,7 +754,7 @@ else ifeq ($(findstring SDL,$(WINDOW_API)),SDL) BACKEND_LDFLAGS += -lGLESv2 else ifeq ($(OSX_BUILD),1) BACKEND_LDFLAGS += -framework OpenGL `pkg-config --libs glew` - EXTRA_CPP_FLAGS += -stdlib=libc++ -std=c++0x + EXTRA_CPP_FLAGS += -stdlib=libc++ -std=c++17 else BACKEND_LDFLAGS += -lGL endif @@ -971,7 +976,9 @@ endif # Prevent a crash with -sopt export LANG := C -LDFLAGS += -latomic +ifeq ($(OSX_BUILD),0) + LDFLAGS += -latomic +endif #==============================================================================# # Extra CC Flags # diff --git a/src/pc/djui/djui_panel_mod_menu.c b/src/pc/djui/djui_panel_mod_menu.c index fcf081cf..2b447f6d 100644 --- a/src/pc/djui/djui_panel_mod_menu.c +++ b/src/pc/djui/djui_panel_mod_menu.c @@ -52,19 +52,22 @@ static void djui_panel_mod_menu_mod_inputbox(struct DjuiBase* caller) { static void djui_panel_mod_menu_mod_create_element(struct DjuiBase* parent, int i) { struct LuaHookedModMenuElement* hooked = &gHookedModMenuElements[i]; switch (hooked->element) { - case MOD_MENU_ELEMENT_BUTTON: + case MOD_MENU_ELEMENT_BUTTON: { struct DjuiButton* button = djui_button_create(parent, hooked->name, DJUI_BUTTON_STYLE_NORMAL, djui_panel_mod_menu_mod_button); button->base.tag = i; break; - case MOD_MENU_ELEMENT_CHECKBOX: + } + case MOD_MENU_ELEMENT_CHECKBOX: { struct DjuiCheckbox* checkbox = djui_checkbox_create(parent, hooked->name, &hooked->boolValue, djui_panel_mod_menu_mod_checkbox); checkbox->base.tag = i; break; - case MOD_MENU_ELEMENT_SLIDER: + } + case MOD_MENU_ELEMENT_SLIDER: { struct DjuiSlider* slider = djui_slider_create(parent, hooked->name, &hooked->uintValue, hooked->sliderMin, hooked->sliderMax, djui_panel_mod_menu_mod_slider); slider->base.tag = i; break; - case MOD_MENU_ELEMENT_INPUTBOX: + } + case MOD_MENU_ELEMENT_INPUTBOX: { struct DjuiRect* rect = djui_rect_container_create(parent, 32); { struct DjuiText* text1 = djui_text_create(&rect->base, hooked->name); @@ -83,6 +86,7 @@ static void djui_panel_mod_menu_mod_create_element(struct DjuiBase* parent, int inputbox->base.tag = i; } break; + } case MOD_MENU_ELEMENT_MAX: } } diff --git a/src/pc/rom_checker.cpp b/src/pc/rom_checker.cpp index 35436502..4785df5b 100644 --- a/src/pc/rom_checker.cpp +++ b/src/pc/rom_checker.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #if defined(_WIN32) || defined(_WIN64) #include