Add HANDHELD build flag
This commit is contained in:
parent
898b6ea937
commit
a64cc6a77c
8
Makefile
8
Makefile
|
@ -59,6 +59,8 @@ HEADLESS ?= 0
|
|||
ICON ?= 1
|
||||
# Use .app (for macOS)
|
||||
USE_APP ?= 1
|
||||
# Make some small adjustments for handheld devices
|
||||
HANDHELD ?= 0
|
||||
|
||||
# Various workarounds for weird toolchains
|
||||
NO_BZERO_BCOPY ?= 0
|
||||
|
@ -1031,6 +1033,12 @@ ifeq ($(ENHANCE_LEVEL_TEXTURES),1)
|
|||
CFLAGS += -DENHANCE_LEVEL_TEXTURES
|
||||
endif
|
||||
|
||||
# Check for handheld option
|
||||
ifeq ($(HANDHELD),1)
|
||||
CC_CHECK_CFLAGS += -DHANDHELD
|
||||
CFLAGS += -DHANDHELD
|
||||
endif
|
||||
|
||||
# Check for no bzero/bcopy workaround option
|
||||
ifeq ($(NO_BZERO_BCOPY),1)
|
||||
CC_CHECK_CFLAGS += -DNO_BZERO_BCOPY
|
||||
|
|
|
@ -179,7 +179,11 @@ char configPassword[MAX_CONFIG_STRING] = "";
|
|||
char configDestId[MAX_CONFIG_STRING] = "0";
|
||||
// DJUI settings
|
||||
unsigned int configDjuiTheme = DJUI_THEME_DARK;
|
||||
#ifdef HANDHELD
|
||||
bool configDjuiThemeCenter = false;
|
||||
#else
|
||||
bool configDjuiThemeCenter = true;
|
||||
#endif
|
||||
unsigned int configDjuiThemeFont = FONT_NORMAL;
|
||||
unsigned int configDjuiScale = 0;
|
||||
// other
|
||||
|
@ -239,7 +243,9 @@ static const struct ConfigOption options[] = {
|
|||
{.name = "rumble_strength", .type = CONFIG_TYPE_UINT, .uintValue = &configRumbleStrength},
|
||||
{.name = "gamepad_number", .type = CONFIG_TYPE_UINT, .uintValue = &configGamepadNumber},
|
||||
{.name = "background_gamepad", .type = CONFIG_TYPE_UINT, .boolValue = &configBackgroundGamepad},
|
||||
#ifndef HANDHELD
|
||||
{.name = "disable_gamepads", .type = CONFIG_TYPE_BOOL, .boolValue = &configDisableGamepads},
|
||||
#endif
|
||||
{.name = "use_standard_key_bindings_chat", .type = CONFIG_TYPE_BOOL, .boolValue = &configUseStandardKeyBindingsChat},
|
||||
// free camera settings
|
||||
{.name = "bettercam_enable", .type = CONFIG_TYPE_BOOL, .boolValue = &configEnableCamera},
|
||||
|
|
|
@ -19,7 +19,9 @@ void djui_panel_controls_create(struct DjuiBase* caller) {
|
|||
djui_button_create(body, DLANG(CONTROLS, N64_BINDS), DJUI_BUTTON_STYLE_NORMAL, djui_panel_controls_n64_create);
|
||||
djui_button_create(body, DLANG(CONTROLS, EXTRA_BINDS), DJUI_BUTTON_STYLE_NORMAL, djui_panel_controls_extra_create);
|
||||
djui_checkbox_create(body, DLANG(CONTROLS, BACKGROUND_GAMEPAD), &configBackgroundGamepad, NULL);
|
||||
#ifndef HANDHELD
|
||||
djui_checkbox_create(body, DLANG(CONTROLS, DISABLE_GAMEPADS), &configDisableGamepads, NULL);
|
||||
#endif
|
||||
djui_checkbox_create(body, DLANG(MISC, USE_STANDARD_KEY_BINDINGS_CHAT), &configUseStandardKeyBindingsChat, NULL);
|
||||
|
||||
#ifdef HAVE_SDL2
|
||||
|
|
|
@ -76,10 +76,12 @@ void djui_panel_misc_create(struct DjuiBase* caller) {
|
|||
#ifdef DEVELOPMENT
|
||||
djui_button_create(body, DLANG(MISC, DEBUG), DJUI_BUTTON_STYLE_NORMAL, djui_panel_options_debug_create);
|
||||
#endif
|
||||
#ifndef HANDHELD
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
djui_button_create(body, DLANG(OPTIONS, APPDATA), DJUI_BUTTON_STYLE_NORMAL, djui_panel_options_open_user_folder);
|
||||
#elif __linux__ || __APPLE__ || __MACH__
|
||||
djui_button_create(body, DLANG(OPTIONS, USER_FOLDER), DJUI_BUTTON_STYLE_NORMAL, djui_panel_options_open_user_folder);
|
||||
#endif
|
||||
#endif
|
||||
djui_button_create(body, DLANG(MENU, BACK), DJUI_BUTTON_STYLE_BACK, djui_panel_menu_back);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue