C_FORCE_MENU_HMENU option

This commit is contained in:
Wengier 2022-01-25 18:09:33 -05:00
parent 14d53647ce
commit ff0e77f8a6
4 changed files with 20 additions and 2 deletions

View File

@ -74,6 +74,8 @@
changeable via CONFIG command. (Wengier)
- The default output for Linux SDL1 builds is changed
from surface to opengl, unlike Linux SDL2. (Wengier)
- Using native Windows menus is supported in Windows
SDL2 build with an option at compile time. (Wengier)
- Setting "windowposition" to "-" in the configuration
will leave DOSBox-X window position as is instead of
a specific position or being centered. (Wengier)

View File

@ -164,6 +164,10 @@ dnl yksoft1 wants a MinGW build for Windows that doesn't use the Windows menu sy
AH_TEMPLATE(C_FORCE_MENU_SDLDRAW,[Define to 1 to force SDL-drawn menus])
AC_ARG_ENABLE(force-menu-sdldraw,AC_HELP_STRING([--enable-force-menu-sdldraw],[Force SDL drawn menus]),enable_force_menu_sdldraw=yes)
dnl For Windows SDL2 builds that use the Windows native menu system.
AH_TEMPLATE(C_FORCE_MENU_HMENU,[Define to 1 to force native menus in Windows SDL2 builds])
AC_ARG_ENABLE(force-menu-hmenu,AC_HELP_STRING([--enable-force-menu-hmenu],[Force Windows SDL2 native menus]),enable_force_menu_hmenu=yes)
dnl This is how the build script can specify a HX DOS extender target
AH_TEMPLATE(C_HX_DOS,[Define to 1 to target HX DOS])
AC_ARG_ENABLE(hx-dos,AC_HELP_STRING([--enable-hx-dos],[Enable HX target]),enable_hx=yes)
@ -212,6 +216,10 @@ if test x$enable_force_menu_sdldraw = xyes; then
AC_DEFINE(C_FORCE_MENU_SDLDRAW,1,[Force SDL drawn menus])
fi
if test x$enable_force_menu_hmenu = xyes; then
AC_DEFINE(C_FORCE_MENU_HMENU,1,[Force Windows SDL2 native menus])
fi
dnl TEST: Environ can be included
AC_MSG_CHECKING(if environ can be included)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[

View File

@ -101,7 +101,9 @@ void DOSBox_NoMenu(void);
#if C_FORCE_MENU_SDLDRAW /* Programmer/Dev wants to compile with SDL drawn menus even if host OS offers menus (shrug) Ok */
# define DOSBOXMENU_TYPE DOSBOXMENU_SDLDRAW
#elif defined(WIN32) && !defined(HX_DOS) && !(defined(C_SDL2) && 1) // Windows SDL1 (and perhaps SDL2) and not HX-DOS
#elif defined(HX_DOS)
# define DOSBOXMENU_TYPE DOSBOXMENU_SDLDRAW
#elif defined(WIN32) && (!defined(C_SDL2) || C_FORCE_MENU_HMENU) // Windows SDL1 and perhaps also SDL2 if desired
# define DOSBOXMENU_TYPE DOSBOXMENU_HMENU
#elif defined(MACOSX)
# define DOSBOXMENU_TYPE DOSBOXMENU_NSMENU

View File

@ -89,8 +89,14 @@
/* Define to 1 to enable libfluidsynth MIDI synthesis */
#undef C_FLUIDSYNTH
/* Force Windows native menus for Windows SDL2 */
#undef C_FORCE_MENU_HMENU
/* Force SDL drawn menus for Windows SDL1 */
#undef C_FORCE_MENU_SDLDRAW
/* Define to 1 to enable floating point emulation */
#define C_FPU 1
#define C_FPU 1
/* Define to 1 to use a x86/x64 assembly fpu core */
/* FIXME: VS2015 x86_64 will not allow inline asm! */