Changes to wxWidgets/SDL2 port :
- Updated UI - OpenGL 3.0 with GLSL/GLSLP-support - Improvements to Windows version - Minor changes/bugfixes Patch from bit.
100
configure
vendored
|
|
@ -4495,7 +4495,7 @@ rm -f core conftest.err conftest.$ac_objext \
|
|||
|
||||
fi
|
||||
else
|
||||
SDL_VERSION=2.0.0
|
||||
SDL_VERSION=2.0.1
|
||||
|
||||
|
||||
|
||||
|
|
@ -5265,6 +5265,55 @@ $as_echo "no (version $WX_VERSION is not new enough)" >&6; }
|
|||
wxWidgets version is $reqwx or above.
|
||||
" "$LINENO" 5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glGetError in -lGL" >&5
|
||||
$as_echo_n "checking for glGetError in -lGL... " >&6; }
|
||||
if ${ac_cv_lib_GL_glGetError+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lGL $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char glGetError ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return glGetError ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_GL_glGetError=yes
|
||||
else
|
||||
ac_cv_lib_GL_glGetError=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GL_glGetError" >&5
|
||||
$as_echo "$ac_cv_lib_GL_glGetError" >&6; }
|
||||
if test "x$ac_cv_lib_GL_glGetError" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBGL 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lGL $LIBS"
|
||||
|
||||
else
|
||||
\
|
||||
echo "You need to install the OpenGL library."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
LIBS="$LIBS $WX_LIBS $SDL_LIBS"
|
||||
fi
|
||||
|
||||
|
|
@ -5317,55 +5366,6 @@ else
|
|||
exit -1
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alutInit in -lalut" >&5
|
||||
$as_echo_n "checking for alutInit in -lalut... " >&6; }
|
||||
if ${ac_cv_lib_alut_alutInit+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lalut $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char alutInit ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return alutInit ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_alut_alutInit=yes
|
||||
else
|
||||
ac_cv_lib_alut_alutInit=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_alut_alutInit" >&5
|
||||
$as_echo "$ac_cv_lib_alut_alutInit" >&6; }
|
||||
if test "x$ac_cv_lib_alut_alutInit" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBALUT 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lalut $LIBS"
|
||||
|
||||
else
|
||||
\
|
||||
echo "You need to install the ALUT library."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
|
||||
$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ if test "$enable_wx" != "yes"; then
|
|||
AM_PATH_ALLEGRO(, , AC_MSG_ERROR(building PCem requires Allegro to be installed))
|
||||
fi
|
||||
else
|
||||
SDL_VERSION=2.0.0
|
||||
SDL_VERSION=2.0.1
|
||||
AM_PATH_SDL2($SDL_VERSION,
|
||||
:,
|
||||
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
|
||||
|
|
@ -89,15 +89,15 @@ else
|
|||
wxWidgets version is $reqwx or above.
|
||||
])
|
||||
fi
|
||||
AC_CHECK_LIB([GL], [glGetError], [], \
|
||||
[echo "You need to install the OpenGL library."
|
||||
exit -1])
|
||||
LIBS="$LIBS $WX_LIBS $SDL_LIBS"
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB([openal], [alGetError], [], \
|
||||
[echo "You need to install the OpenAL library."
|
||||
exit -1])
|
||||
AC_CHECK_LIB([alut], [alutInit], [], \
|
||||
[echo "You need to install the ALUT library."
|
||||
exit -1])
|
||||
|
||||
AC_CHECK_LIB([pthread], [pthread_create])
|
||||
|
||||
|
|
|
|||
|
|
@ -40,8 +40,9 @@ pcem_CXXFLAGS = $(shell wx-config --cxxflags) $(shell sdl2-config --cflags)
|
|||
pcem_LDADD = @LIBS@
|
||||
pcem_SOURCES += wx-main.cc wx-config_sel.c wx-dialogbox.cc wx-utils.cc wx-app.cc \
|
||||
wx-sdl2-joystick.c wx-sdl2-mouse.c wx-sdl2-keyboard.c wx-sdl2-video.c wx-sdl2-midi.c \
|
||||
wx-sdl2.c wx-config.c wx-deviceconfig.cc wx-sdl2-hdconf.c wx-status.cc wx-sdl2-status.c \
|
||||
wx-resources.cpp wx-thread.c wx-common.c wx-sdl2-display.c
|
||||
wx-sdl2.c wx-config.c wx-deviceconfig.cc wx-status.cc wx-sdl2-status.c \
|
||||
wx-resources.cpp wx-thread.c wx-common.c wx-sdl2-display.c wx-sdl2-video-renderer.c wx-sdl2-video-gl3.c \
|
||||
wx-glslp-parser.c wx-shader_man.c wx-shaderconfig.cc
|
||||
else
|
||||
pcem_CFLAGS = $(allegro_CFLAGS) -DPCEM_ALLEGRO
|
||||
pcem_LDADD = $(allegro_LIBS) -lopenal
|
||||
|
|
|
|||
454
src/Makefile.in
|
|
@ -94,8 +94,9 @@ host_triplet = @host@
|
|||
bin_PROGRAMS = pcem$(EXEEXT)
|
||||
@USE_WX_TRUE@am__append_1 = wx-main.cc wx-config_sel.c wx-dialogbox.cc wx-utils.cc wx-app.cc \
|
||||
@USE_WX_TRUE@ wx-sdl2-joystick.c wx-sdl2-mouse.c wx-sdl2-keyboard.c wx-sdl2-video.c wx-sdl2-midi.c \
|
||||
@USE_WX_TRUE@ wx-sdl2.c wx-config.c wx-deviceconfig.cc wx-sdl2-hdconf.c wx-status.cc wx-sdl2-status.c \
|
||||
@USE_WX_TRUE@ wx-resources.cpp wx-thread.c wx-common.c wx-sdl2-display.c
|
||||
@USE_WX_TRUE@ wx-sdl2.c wx-config.c wx-deviceconfig.cc wx-status.cc wx-sdl2-status.c \
|
||||
@USE_WX_TRUE@ wx-resources.cpp wx-thread.c wx-common.c wx-sdl2-display.c wx-sdl2-video-renderer.c wx-sdl2-video-gl3.c \
|
||||
@USE_WX_TRUE@ wx-glslp-parser.c wx-shader_man.c wx-shaderconfig.cc
|
||||
|
||||
@USE_WX_FALSE@am__append_2 = allegro-gui.c allegro-gui-config-sel.c allegro-gui-configure.c \
|
||||
@USE_WX_FALSE@ allegro-gui-deviceconfig.c allegro-gui-hdconf.c allegro-joystick.c \
|
||||
|
|
@ -121,37 +122,39 @@ am__pcem_SOURCES_DIST = 386.c 386_dynarec.c 386_dynarec_ops.c 808x.c \
|
|||
acer386sx.c ali1429.c amstrad.c cdrom-ioctl-linux.c \
|
||||
cdrom-image.cc cdrom-null.c codegen.c codegen_ops.c \
|
||||
codegen_timing_486.c codegen_timing_686.c \
|
||||
codegen_timing_pentium.c codegen_timing_winchip.c compaq.c \
|
||||
config.c cpu.c dac.c dells200.c device.c disc.c disc_fdi.c \
|
||||
disc_img.c disc_sector.c dma.c fdc.c fdc37c665.c fdd.c \
|
||||
fdi2raw.c gameport.c hdd.c hdd_esdi.c headland.c i430lx.c \
|
||||
i430fx.c i430vx.c ide.c intel.c intel_flash.c io.c jim.c \
|
||||
codegen_timing_common.c codegen_timing_pentium.c \
|
||||
codegen_timing_winchip.c compaq.c config.c cpu.c dac.c \
|
||||
dells200.c device.c disc.c disc_fdi.c disc_img.c disc_sector.c \
|
||||
dma.c esdi_at.c fdc.c fdc37c665.c fdd.c fdi2raw.c gameport.c \
|
||||
hdd.c hdd_esdi.c hdd_file.c headland.c i430lx.c i430fx.c \
|
||||
i430vx.c ide.c intel.c intel_flash.c io.c jim.c \
|
||||
joystick_ch_flightstick_pro.c joystick_standard.c \
|
||||
joystick_sw_pad.c joystick_tm_fcs.c keyboard.c \
|
||||
keyboard_amstrad.c keyboard_at.c keyboard_olim24.c \
|
||||
keyboard_pcjr.c keyboard_xt.c lpt.c mca.c mcr.c mem.c mfm_at.c \
|
||||
mfm_xebec.c model.c mouse.c mouse_ps2.c mouse_serial.c neat.c \
|
||||
nmi.c nvr.c olivetti_m24.c opti495.c pc.c pci.c pic.c piix.c \
|
||||
pit.c ppi.c ps1.c ps2.c ps2_mca.c ps2_nvr.c rom.c rtc.c scat.c \
|
||||
serial.c sis496.c sound.c sound_ad1848.c sound_adlib.c \
|
||||
sound_adlibgold.c sound_cms.c sound_emu8k.c sound_gus.c \
|
||||
sound_mpu401_uart.c sound_opl.c sound_pas16.c sound_ps1.c \
|
||||
sound_pssj.c sound_sb.c sound_sb_dsp.c sound_sn76489.c \
|
||||
sound_speaker.c sound_ssi2001.c sound_wss.c sound_ym7128.c \
|
||||
soundopenal.c tandy_eeprom.c tandy_rom.c timer.c um8669f.c \
|
||||
um8881f.c vid_ati_eeprom.c vid_ati_mach64.c vid_ati18800.c \
|
||||
vid_ati28800.c vid_ati68860_ramdac.c vid_cga.c vid_cl5429.c \
|
||||
vid_colorplus.c vid_ega.c vid_et4000.c vid_et4000w32.c \
|
||||
vid_genius.c vid_hercules.c vid_icd2061.c vid_ics2595.c \
|
||||
vid_incolor.c vid_mda.c vid_olivetti_m24.c vid_oti067.c \
|
||||
vid_paradise.c vid_pc200.c vid_pc1512.c vid_pc1640.c \
|
||||
vid_pcjr.c vid_ps1_svga.c vid_s3.c vid_s3_virge.c \
|
||||
vid_sdac_ramdac.c vid_stg_ramdac.c vid_svga.c \
|
||||
vid_svga_render.c vid_tandy.c vid_tandysl.c vid_tgui9440.c \
|
||||
vid_tkd8001_ramdac.c vid_tvga.c vid_unk_ramdac.c vid_vga.c \
|
||||
vid_voodoo.c video.c wd76c10.c vid_wy700.c x86seg.c x87.c \
|
||||
xtide.c sound_dbopl.cc sound_resid.cc dosbox/cdrom_image.cpp \
|
||||
dosbox/dbopl.cpp dosbox/vid_cga_comp.c resid-fp/convolve.cc \
|
||||
keyboard_pcjr.c keyboard_xt.c laserxt.c lpt.c mca.c mcr.c \
|
||||
mem.c mfm_at.c mfm_xebec.c model.c mouse.c mouse_ps2.c \
|
||||
mouse_serial.c neat.c nmi.c nvr.c olivetti_m24.c opti495.c \
|
||||
paths.c pc.c pci.c pic.c piix.c pit.c ppi.c ps1.c ps2.c \
|
||||
ps2_mca.c ps2_nvr.c rom.c rtc.c scat.c serial.c sio.c sis496.c \
|
||||
sound.c sound_ad1848.c sound_adlib.c sound_adlibgold.c \
|
||||
sound_cms.c sound_emu8k.c sound_gus.c sound_mpu401_uart.c \
|
||||
sound_opl.c sound_pas16.c sound_ps1.c sound_pssj.c sound_sb.c \
|
||||
sound_sb_dsp.c sound_sn76489.c sound_speaker.c sound_ssi2001.c \
|
||||
sound_wss.c sound_ym7128.c soundopenal.c tandy_eeprom.c \
|
||||
tandy_rom.c timer.c um8669f.c um8881f.c vid_ati_eeprom.c \
|
||||
vid_ati_mach64.c vid_ati18800.c vid_ati28800.c \
|
||||
vid_ati68860_ramdac.c vid_cga.c vid_cl5429.c vid_colorplus.c \
|
||||
vid_ega.c vid_et4000.c vid_et4000w32.c vid_genius.c \
|
||||
vid_hercules.c vid_icd2061.c vid_ics2595.c vid_incolor.c \
|
||||
vid_mda.c vid_olivetti_m24.c vid_oti067.c vid_paradise.c \
|
||||
vid_pc200.c vid_pc1512.c vid_pc1640.c vid_pcjr.c \
|
||||
vid_ps1_svga.c vid_s3.c vid_s3_virge.c vid_sdac_ramdac.c \
|
||||
vid_stg_ramdac.c vid_svga.c vid_svga_render.c vid_tandy.c \
|
||||
vid_tandysl.c vid_tgui9440.c vid_tkd8001_ramdac.c vid_tvga.c \
|
||||
vid_unk_ramdac.c vid_vga.c vid_voodoo.c video.c wd76c10.c \
|
||||
vid_wy700.c x86seg.c x87.c xtide.c sound_dbopl.cc \
|
||||
sound_resid.cc dosbox/cdrom_image.cpp dosbox/dbopl.cpp \
|
||||
dosbox/nukedopl.cpp dosbox/vid_cga_comp.c resid-fp/convolve.cc \
|
||||
resid-fp/convolve-sse.cc resid-fp/envelope.cc \
|
||||
resid-fp/extfilt.cc resid-fp/filter.cc resid-fp/pot.cc \
|
||||
resid-fp/sid.cc resid-fp/voice.cc resid-fp/wave6581_PS_.cc \
|
||||
|
|
@ -162,12 +165,14 @@ am__pcem_SOURCES_DIST = 386.c 386_dynarec.c 386_dynarec_ops.c 808x.c \
|
|||
wx-config_sel.c wx-dialogbox.cc wx-utils.cc wx-app.cc \
|
||||
wx-sdl2-joystick.c wx-sdl2-mouse.c wx-sdl2-keyboard.c \
|
||||
wx-sdl2-video.c wx-sdl2-midi.c wx-sdl2.c wx-config.c \
|
||||
wx-deviceconfig.cc wx-sdl2-hdconf.c wx-status.cc \
|
||||
wx-sdl2-status.c wx-resources.cpp wx-thread.c wx-common.c \
|
||||
wx-sdl2-display.c allegro-gui.c allegro-gui-config-sel.c \
|
||||
allegro-gui-configure.c allegro-gui-deviceconfig.c \
|
||||
allegro-gui-hdconf.c allegro-joystick.c allegro-keyboard.c \
|
||||
allegro-main.c allegro-midi.c allegro-mouse.c allegro-video.c \
|
||||
wx-deviceconfig.cc wx-status.cc wx-sdl2-status.c \
|
||||
wx-resources.cpp wx-thread.c wx-common.c wx-sdl2-display.c \
|
||||
wx-sdl2-video-renderer.c wx-sdl2-video-gl3.c wx-glslp-parser.c \
|
||||
wx-shader_man.c wx-shaderconfig.cc allegro-gui.c \
|
||||
allegro-gui-config-sel.c allegro-gui-configure.c \
|
||||
allegro-gui-deviceconfig.c allegro-gui-hdconf.c \
|
||||
allegro-joystick.c allegro-keyboard.c allegro-main.c \
|
||||
allegro-midi.c allegro-mouse.c allegro-video.c \
|
||||
thread-pthread.c codegen_x86.c codegen_x86-64.c
|
||||
@USE_WX_TRUE@am__objects_1 = pcem-wx-main.$(OBJEXT) \
|
||||
@USE_WX_TRUE@ pcem-wx-config_sel.$(OBJEXT) \
|
||||
|
|
@ -180,12 +185,16 @@ am__pcem_SOURCES_DIST = 386.c 386_dynarec.c 386_dynarec_ops.c 808x.c \
|
|||
@USE_WX_TRUE@ pcem-wx-sdl2-midi.$(OBJEXT) \
|
||||
@USE_WX_TRUE@ pcem-wx-sdl2.$(OBJEXT) pcem-wx-config.$(OBJEXT) \
|
||||
@USE_WX_TRUE@ pcem-wx-deviceconfig.$(OBJEXT) \
|
||||
@USE_WX_TRUE@ pcem-wx-sdl2-hdconf.$(OBJEXT) \
|
||||
@USE_WX_TRUE@ pcem-wx-status.$(OBJEXT) \
|
||||
@USE_WX_TRUE@ pcem-wx-sdl2-status.$(OBJEXT) \
|
||||
@USE_WX_TRUE@ pcem-wx-resources.$(OBJEXT) \
|
||||
@USE_WX_TRUE@ pcem-wx-thread.$(OBJEXT) pcem-wx-common.$(OBJEXT) \
|
||||
@USE_WX_TRUE@ pcem-wx-sdl2-display.$(OBJEXT)
|
||||
@USE_WX_TRUE@ pcem-wx-sdl2-display.$(OBJEXT) \
|
||||
@USE_WX_TRUE@ pcem-wx-sdl2-video-renderer.$(OBJEXT) \
|
||||
@USE_WX_TRUE@ pcem-wx-sdl2-video-gl3.$(OBJEXT) \
|
||||
@USE_WX_TRUE@ pcem-wx-glslp-parser.$(OBJEXT) \
|
||||
@USE_WX_TRUE@ pcem-wx-shader_man.$(OBJEXT) \
|
||||
@USE_WX_TRUE@ pcem-wx-shaderconfig.$(OBJEXT)
|
||||
@USE_WX_FALSE@am__objects_2 = pcem-allegro-gui.$(OBJEXT) \
|
||||
@USE_WX_FALSE@ pcem-allegro-gui-config-sel.$(OBJEXT) \
|
||||
@USE_WX_FALSE@ pcem-allegro-gui-configure.$(OBJEXT) \
|
||||
|
|
@ -208,16 +217,18 @@ am_pcem_OBJECTS = pcem-386.$(OBJEXT) pcem-386_dynarec.$(OBJEXT) \
|
|||
pcem-codegen.$(OBJEXT) pcem-codegen_ops.$(OBJEXT) \
|
||||
pcem-codegen_timing_486.$(OBJEXT) \
|
||||
pcem-codegen_timing_686.$(OBJEXT) \
|
||||
pcem-codegen_timing_common.$(OBJEXT) \
|
||||
pcem-codegen_timing_pentium.$(OBJEXT) \
|
||||
pcem-codegen_timing_winchip.$(OBJEXT) pcem-compaq.$(OBJEXT) \
|
||||
pcem-config.$(OBJEXT) pcem-cpu.$(OBJEXT) pcem-dac.$(OBJEXT) \
|
||||
pcem-dells200.$(OBJEXT) pcem-device.$(OBJEXT) \
|
||||
pcem-disc.$(OBJEXT) pcem-disc_fdi.$(OBJEXT) \
|
||||
pcem-disc_img.$(OBJEXT) pcem-disc_sector.$(OBJEXT) \
|
||||
pcem-dma.$(OBJEXT) pcem-fdc.$(OBJEXT) pcem-fdc37c665.$(OBJEXT) \
|
||||
pcem-fdd.$(OBJEXT) pcem-fdi2raw.$(OBJEXT) \
|
||||
pcem-gameport.$(OBJEXT) pcem-hdd.$(OBJEXT) \
|
||||
pcem-hdd_esdi.$(OBJEXT) pcem-headland.$(OBJEXT) \
|
||||
pcem-dma.$(OBJEXT) pcem-esdi_at.$(OBJEXT) pcem-fdc.$(OBJEXT) \
|
||||
pcem-fdc37c665.$(OBJEXT) pcem-fdd.$(OBJEXT) \
|
||||
pcem-fdi2raw.$(OBJEXT) pcem-gameport.$(OBJEXT) \
|
||||
pcem-hdd.$(OBJEXT) pcem-hdd_esdi.$(OBJEXT) \
|
||||
pcem-hdd_file.$(OBJEXT) pcem-headland.$(OBJEXT) \
|
||||
pcem-i430lx.$(OBJEXT) pcem-i430fx.$(OBJEXT) \
|
||||
pcem-i430vx.$(OBJEXT) pcem-ide.$(OBJEXT) pcem-intel.$(OBJEXT) \
|
||||
pcem-intel_flash.$(OBJEXT) pcem-io.$(OBJEXT) \
|
||||
|
|
@ -227,65 +238,67 @@ am_pcem_OBJECTS = pcem-386.$(OBJEXT) pcem-386_dynarec.$(OBJEXT) \
|
|||
pcem-keyboard.$(OBJEXT) pcem-keyboard_amstrad.$(OBJEXT) \
|
||||
pcem-keyboard_at.$(OBJEXT) pcem-keyboard_olim24.$(OBJEXT) \
|
||||
pcem-keyboard_pcjr.$(OBJEXT) pcem-keyboard_xt.$(OBJEXT) \
|
||||
pcem-lpt.$(OBJEXT) pcem-mca.$(OBJEXT) pcem-mcr.$(OBJEXT) \
|
||||
pcem-mem.$(OBJEXT) pcem-mfm_at.$(OBJEXT) \
|
||||
pcem-laserxt.$(OBJEXT) pcem-lpt.$(OBJEXT) pcem-mca.$(OBJEXT) \
|
||||
pcem-mcr.$(OBJEXT) pcem-mem.$(OBJEXT) pcem-mfm_at.$(OBJEXT) \
|
||||
pcem-mfm_xebec.$(OBJEXT) pcem-model.$(OBJEXT) \
|
||||
pcem-mouse.$(OBJEXT) pcem-mouse_ps2.$(OBJEXT) \
|
||||
pcem-mouse_serial.$(OBJEXT) pcem-neat.$(OBJEXT) \
|
||||
pcem-nmi.$(OBJEXT) pcem-nvr.$(OBJEXT) \
|
||||
pcem-olivetti_m24.$(OBJEXT) pcem-opti495.$(OBJEXT) \
|
||||
pcem-pc.$(OBJEXT) pcem-pci.$(OBJEXT) pcem-pic.$(OBJEXT) \
|
||||
pcem-piix.$(OBJEXT) pcem-pit.$(OBJEXT) pcem-ppi.$(OBJEXT) \
|
||||
pcem-ps1.$(OBJEXT) pcem-ps2.$(OBJEXT) pcem-ps2_mca.$(OBJEXT) \
|
||||
pcem-ps2_nvr.$(OBJEXT) pcem-rom.$(OBJEXT) pcem-rtc.$(OBJEXT) \
|
||||
pcem-scat.$(OBJEXT) pcem-serial.$(OBJEXT) \
|
||||
pcem-sis496.$(OBJEXT) pcem-sound.$(OBJEXT) \
|
||||
pcem-sound_ad1848.$(OBJEXT) pcem-sound_adlib.$(OBJEXT) \
|
||||
pcem-sound_adlibgold.$(OBJEXT) pcem-sound_cms.$(OBJEXT) \
|
||||
pcem-sound_emu8k.$(OBJEXT) pcem-sound_gus.$(OBJEXT) \
|
||||
pcem-sound_mpu401_uart.$(OBJEXT) pcem-sound_opl.$(OBJEXT) \
|
||||
pcem-sound_pas16.$(OBJEXT) pcem-sound_ps1.$(OBJEXT) \
|
||||
pcem-sound_pssj.$(OBJEXT) pcem-sound_sb.$(OBJEXT) \
|
||||
pcem-sound_sb_dsp.$(OBJEXT) pcem-sound_sn76489.$(OBJEXT) \
|
||||
pcem-sound_speaker.$(OBJEXT) pcem-sound_ssi2001.$(OBJEXT) \
|
||||
pcem-sound_wss.$(OBJEXT) pcem-sound_ym7128.$(OBJEXT) \
|
||||
pcem-soundopenal.$(OBJEXT) pcem-tandy_eeprom.$(OBJEXT) \
|
||||
pcem-tandy_rom.$(OBJEXT) pcem-timer.$(OBJEXT) \
|
||||
pcem-um8669f.$(OBJEXT) pcem-um8881f.$(OBJEXT) \
|
||||
pcem-vid_ati_eeprom.$(OBJEXT) pcem-vid_ati_mach64.$(OBJEXT) \
|
||||
pcem-vid_ati18800.$(OBJEXT) pcem-vid_ati28800.$(OBJEXT) \
|
||||
pcem-vid_ati68860_ramdac.$(OBJEXT) pcem-vid_cga.$(OBJEXT) \
|
||||
pcem-vid_cl5429.$(OBJEXT) pcem-vid_colorplus.$(OBJEXT) \
|
||||
pcem-vid_ega.$(OBJEXT) pcem-vid_et4000.$(OBJEXT) \
|
||||
pcem-vid_et4000w32.$(OBJEXT) pcem-vid_genius.$(OBJEXT) \
|
||||
pcem-vid_hercules.$(OBJEXT) pcem-vid_icd2061.$(OBJEXT) \
|
||||
pcem-vid_ics2595.$(OBJEXT) pcem-vid_incolor.$(OBJEXT) \
|
||||
pcem-vid_mda.$(OBJEXT) pcem-vid_olivetti_m24.$(OBJEXT) \
|
||||
pcem-vid_oti067.$(OBJEXT) pcem-vid_paradise.$(OBJEXT) \
|
||||
pcem-vid_pc200.$(OBJEXT) pcem-vid_pc1512.$(OBJEXT) \
|
||||
pcem-vid_pc1640.$(OBJEXT) pcem-vid_pcjr.$(OBJEXT) \
|
||||
pcem-vid_ps1_svga.$(OBJEXT) pcem-vid_s3.$(OBJEXT) \
|
||||
pcem-vid_s3_virge.$(OBJEXT) pcem-vid_sdac_ramdac.$(OBJEXT) \
|
||||
pcem-vid_stg_ramdac.$(OBJEXT) pcem-vid_svga.$(OBJEXT) \
|
||||
pcem-vid_svga_render.$(OBJEXT) pcem-vid_tandy.$(OBJEXT) \
|
||||
pcem-vid_tandysl.$(OBJEXT) pcem-vid_tgui9440.$(OBJEXT) \
|
||||
pcem-vid_tkd8001_ramdac.$(OBJEXT) pcem-vid_tvga.$(OBJEXT) \
|
||||
pcem-vid_unk_ramdac.$(OBJEXT) pcem-vid_vga.$(OBJEXT) \
|
||||
pcem-vid_voodoo.$(OBJEXT) pcem-video.$(OBJEXT) \
|
||||
pcem-wd76c10.$(OBJEXT) pcem-vid_wy700.$(OBJEXT) \
|
||||
pcem-x86seg.$(OBJEXT) pcem-x87.$(OBJEXT) pcem-xtide.$(OBJEXT) \
|
||||
pcem-paths.$(OBJEXT) pcem-pc.$(OBJEXT) pcem-pci.$(OBJEXT) \
|
||||
pcem-pic.$(OBJEXT) pcem-piix.$(OBJEXT) pcem-pit.$(OBJEXT) \
|
||||
pcem-ppi.$(OBJEXT) pcem-ps1.$(OBJEXT) pcem-ps2.$(OBJEXT) \
|
||||
pcem-ps2_mca.$(OBJEXT) pcem-ps2_nvr.$(OBJEXT) \
|
||||
pcem-rom.$(OBJEXT) pcem-rtc.$(OBJEXT) pcem-scat.$(OBJEXT) \
|
||||
pcem-serial.$(OBJEXT) pcem-sio.$(OBJEXT) pcem-sis496.$(OBJEXT) \
|
||||
pcem-sound.$(OBJEXT) pcem-sound_ad1848.$(OBJEXT) \
|
||||
pcem-sound_adlib.$(OBJEXT) pcem-sound_adlibgold.$(OBJEXT) \
|
||||
pcem-sound_cms.$(OBJEXT) pcem-sound_emu8k.$(OBJEXT) \
|
||||
pcem-sound_gus.$(OBJEXT) pcem-sound_mpu401_uart.$(OBJEXT) \
|
||||
pcem-sound_opl.$(OBJEXT) pcem-sound_pas16.$(OBJEXT) \
|
||||
pcem-sound_ps1.$(OBJEXT) pcem-sound_pssj.$(OBJEXT) \
|
||||
pcem-sound_sb.$(OBJEXT) pcem-sound_sb_dsp.$(OBJEXT) \
|
||||
pcem-sound_sn76489.$(OBJEXT) pcem-sound_speaker.$(OBJEXT) \
|
||||
pcem-sound_ssi2001.$(OBJEXT) pcem-sound_wss.$(OBJEXT) \
|
||||
pcem-sound_ym7128.$(OBJEXT) pcem-soundopenal.$(OBJEXT) \
|
||||
pcem-tandy_eeprom.$(OBJEXT) pcem-tandy_rom.$(OBJEXT) \
|
||||
pcem-timer.$(OBJEXT) pcem-um8669f.$(OBJEXT) \
|
||||
pcem-um8881f.$(OBJEXT) pcem-vid_ati_eeprom.$(OBJEXT) \
|
||||
pcem-vid_ati_mach64.$(OBJEXT) pcem-vid_ati18800.$(OBJEXT) \
|
||||
pcem-vid_ati28800.$(OBJEXT) pcem-vid_ati68860_ramdac.$(OBJEXT) \
|
||||
pcem-vid_cga.$(OBJEXT) pcem-vid_cl5429.$(OBJEXT) \
|
||||
pcem-vid_colorplus.$(OBJEXT) pcem-vid_ega.$(OBJEXT) \
|
||||
pcem-vid_et4000.$(OBJEXT) pcem-vid_et4000w32.$(OBJEXT) \
|
||||
pcem-vid_genius.$(OBJEXT) pcem-vid_hercules.$(OBJEXT) \
|
||||
pcem-vid_icd2061.$(OBJEXT) pcem-vid_ics2595.$(OBJEXT) \
|
||||
pcem-vid_incolor.$(OBJEXT) pcem-vid_mda.$(OBJEXT) \
|
||||
pcem-vid_olivetti_m24.$(OBJEXT) pcem-vid_oti067.$(OBJEXT) \
|
||||
pcem-vid_paradise.$(OBJEXT) pcem-vid_pc200.$(OBJEXT) \
|
||||
pcem-vid_pc1512.$(OBJEXT) pcem-vid_pc1640.$(OBJEXT) \
|
||||
pcem-vid_pcjr.$(OBJEXT) pcem-vid_ps1_svga.$(OBJEXT) \
|
||||
pcem-vid_s3.$(OBJEXT) pcem-vid_s3_virge.$(OBJEXT) \
|
||||
pcem-vid_sdac_ramdac.$(OBJEXT) pcem-vid_stg_ramdac.$(OBJEXT) \
|
||||
pcem-vid_svga.$(OBJEXT) pcem-vid_svga_render.$(OBJEXT) \
|
||||
pcem-vid_tandy.$(OBJEXT) pcem-vid_tandysl.$(OBJEXT) \
|
||||
pcem-vid_tgui9440.$(OBJEXT) pcem-vid_tkd8001_ramdac.$(OBJEXT) \
|
||||
pcem-vid_tvga.$(OBJEXT) pcem-vid_unk_ramdac.$(OBJEXT) \
|
||||
pcem-vid_vga.$(OBJEXT) pcem-vid_voodoo.$(OBJEXT) \
|
||||
pcem-video.$(OBJEXT) pcem-wd76c10.$(OBJEXT) \
|
||||
pcem-vid_wy700.$(OBJEXT) pcem-x86seg.$(OBJEXT) \
|
||||
pcem-x87.$(OBJEXT) pcem-xtide.$(OBJEXT) \
|
||||
pcem-sound_dbopl.$(OBJEXT) pcem-sound_resid.$(OBJEXT) \
|
||||
pcem-cdrom_image.$(OBJEXT) pcem-dbopl.$(OBJEXT) \
|
||||
pcem-vid_cga_comp.$(OBJEXT) pcem-convolve.$(OBJEXT) \
|
||||
pcem-convolve-sse.$(OBJEXT) pcem-envelope.$(OBJEXT) \
|
||||
pcem-extfilt.$(OBJEXT) pcem-filter.$(OBJEXT) \
|
||||
pcem-pot.$(OBJEXT) pcem-sid.$(OBJEXT) pcem-voice.$(OBJEXT) \
|
||||
pcem-wave6581_PS_.$(OBJEXT) pcem-wave6581_PST.$(OBJEXT) \
|
||||
pcem-wave6581_P_T.$(OBJEXT) pcem-wave6581__ST.$(OBJEXT) \
|
||||
pcem-wave8580_PS_.$(OBJEXT) pcem-wave8580_PST.$(OBJEXT) \
|
||||
pcem-wave8580_P_T.$(OBJEXT) pcem-wave8580__ST.$(OBJEXT) \
|
||||
pcem-wave.$(OBJEXT) $(am__objects_1) $(am__objects_2) \
|
||||
$(am__objects_3) $(am__objects_4)
|
||||
pcem-nukedopl.$(OBJEXT) pcem-vid_cga_comp.$(OBJEXT) \
|
||||
pcem-convolve.$(OBJEXT) pcem-convolve-sse.$(OBJEXT) \
|
||||
pcem-envelope.$(OBJEXT) pcem-extfilt.$(OBJEXT) \
|
||||
pcem-filter.$(OBJEXT) pcem-pot.$(OBJEXT) pcem-sid.$(OBJEXT) \
|
||||
pcem-voice.$(OBJEXT) pcem-wave6581_PS_.$(OBJEXT) \
|
||||
pcem-wave6581_PST.$(OBJEXT) pcem-wave6581_P_T.$(OBJEXT) \
|
||||
pcem-wave6581__ST.$(OBJEXT) pcem-wave8580_PS_.$(OBJEXT) \
|
||||
pcem-wave8580_PST.$(OBJEXT) pcem-wave8580_P_T.$(OBJEXT) \
|
||||
pcem-wave8580__ST.$(OBJEXT) pcem-wave.$(OBJEXT) \
|
||||
$(am__objects_1) $(am__objects_2) $(am__objects_3) \
|
||||
$(am__objects_4)
|
||||
pcem_OBJECTS = $(am_pcem_OBJECTS)
|
||||
am__DEPENDENCIES_1 =
|
||||
@USE_WX_FALSE@pcem_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
|
|
@ -490,37 +503,39 @@ pcem_SOURCES = 386.c 386_dynarec.c 386_dynarec_ops.c 808x.c \
|
|||
acer386sx.c ali1429.c amstrad.c cdrom-ioctl-linux.c \
|
||||
cdrom-image.cc cdrom-null.c codegen.c codegen_ops.c \
|
||||
codegen_timing_486.c codegen_timing_686.c \
|
||||
codegen_timing_pentium.c codegen_timing_winchip.c compaq.c \
|
||||
config.c cpu.c dac.c dells200.c device.c disc.c disc_fdi.c \
|
||||
disc_img.c disc_sector.c dma.c fdc.c fdc37c665.c fdd.c \
|
||||
fdi2raw.c gameport.c hdd.c hdd_esdi.c headland.c i430lx.c \
|
||||
i430fx.c i430vx.c ide.c intel.c intel_flash.c io.c jim.c \
|
||||
codegen_timing_common.c codegen_timing_pentium.c \
|
||||
codegen_timing_winchip.c compaq.c config.c cpu.c dac.c \
|
||||
dells200.c device.c disc.c disc_fdi.c disc_img.c disc_sector.c \
|
||||
dma.c esdi_at.c fdc.c fdc37c665.c fdd.c fdi2raw.c gameport.c \
|
||||
hdd.c hdd_esdi.c hdd_file.c headland.c i430lx.c i430fx.c \
|
||||
i430vx.c ide.c intel.c intel_flash.c io.c jim.c \
|
||||
joystick_ch_flightstick_pro.c joystick_standard.c \
|
||||
joystick_sw_pad.c joystick_tm_fcs.c keyboard.c \
|
||||
keyboard_amstrad.c keyboard_at.c keyboard_olim24.c \
|
||||
keyboard_pcjr.c keyboard_xt.c lpt.c mca.c mcr.c mem.c mfm_at.c \
|
||||
mfm_xebec.c model.c mouse.c mouse_ps2.c mouse_serial.c neat.c \
|
||||
nmi.c nvr.c olivetti_m24.c opti495.c pc.c pci.c pic.c piix.c \
|
||||
pit.c ppi.c ps1.c ps2.c ps2_mca.c ps2_nvr.c rom.c rtc.c scat.c \
|
||||
serial.c sis496.c sound.c sound_ad1848.c sound_adlib.c \
|
||||
sound_adlibgold.c sound_cms.c sound_emu8k.c sound_gus.c \
|
||||
sound_mpu401_uart.c sound_opl.c sound_pas16.c sound_ps1.c \
|
||||
sound_pssj.c sound_sb.c sound_sb_dsp.c sound_sn76489.c \
|
||||
sound_speaker.c sound_ssi2001.c sound_wss.c sound_ym7128.c \
|
||||
soundopenal.c tandy_eeprom.c tandy_rom.c timer.c um8669f.c \
|
||||
um8881f.c vid_ati_eeprom.c vid_ati_mach64.c vid_ati18800.c \
|
||||
vid_ati28800.c vid_ati68860_ramdac.c vid_cga.c vid_cl5429.c \
|
||||
vid_colorplus.c vid_ega.c vid_et4000.c vid_et4000w32.c \
|
||||
vid_genius.c vid_hercules.c vid_icd2061.c vid_ics2595.c \
|
||||
vid_incolor.c vid_mda.c vid_olivetti_m24.c vid_oti067.c \
|
||||
vid_paradise.c vid_pc200.c vid_pc1512.c vid_pc1640.c \
|
||||
vid_pcjr.c vid_ps1_svga.c vid_s3.c vid_s3_virge.c \
|
||||
vid_sdac_ramdac.c vid_stg_ramdac.c vid_svga.c \
|
||||
vid_svga_render.c vid_tandy.c vid_tandysl.c vid_tgui9440.c \
|
||||
vid_tkd8001_ramdac.c vid_tvga.c vid_unk_ramdac.c vid_vga.c \
|
||||
vid_voodoo.c video.c wd76c10.c vid_wy700.c x86seg.c x87.c \
|
||||
xtide.c sound_dbopl.cc sound_resid.cc dosbox/cdrom_image.cpp \
|
||||
dosbox/dbopl.cpp dosbox/vid_cga_comp.c resid-fp/convolve.cc \
|
||||
keyboard_pcjr.c keyboard_xt.c laserxt.c lpt.c mca.c mcr.c \
|
||||
mem.c mfm_at.c mfm_xebec.c model.c mouse.c mouse_ps2.c \
|
||||
mouse_serial.c neat.c nmi.c nvr.c olivetti_m24.c opti495.c \
|
||||
paths.c pc.c pci.c pic.c piix.c pit.c ppi.c ps1.c ps2.c \
|
||||
ps2_mca.c ps2_nvr.c rom.c rtc.c scat.c serial.c sio.c sis496.c \
|
||||
sound.c sound_ad1848.c sound_adlib.c sound_adlibgold.c \
|
||||
sound_cms.c sound_emu8k.c sound_gus.c sound_mpu401_uart.c \
|
||||
sound_opl.c sound_pas16.c sound_ps1.c sound_pssj.c sound_sb.c \
|
||||
sound_sb_dsp.c sound_sn76489.c sound_speaker.c sound_ssi2001.c \
|
||||
sound_wss.c sound_ym7128.c soundopenal.c tandy_eeprom.c \
|
||||
tandy_rom.c timer.c um8669f.c um8881f.c vid_ati_eeprom.c \
|
||||
vid_ati_mach64.c vid_ati18800.c vid_ati28800.c \
|
||||
vid_ati68860_ramdac.c vid_cga.c vid_cl5429.c vid_colorplus.c \
|
||||
vid_ega.c vid_et4000.c vid_et4000w32.c vid_genius.c \
|
||||
vid_hercules.c vid_icd2061.c vid_ics2595.c vid_incolor.c \
|
||||
vid_mda.c vid_olivetti_m24.c vid_oti067.c vid_paradise.c \
|
||||
vid_pc200.c vid_pc1512.c vid_pc1640.c vid_pcjr.c \
|
||||
vid_ps1_svga.c vid_s3.c vid_s3_virge.c vid_sdac_ramdac.c \
|
||||
vid_stg_ramdac.c vid_svga.c vid_svga_render.c vid_tandy.c \
|
||||
vid_tandysl.c vid_tgui9440.c vid_tkd8001_ramdac.c vid_tvga.c \
|
||||
vid_unk_ramdac.c vid_vga.c vid_voodoo.c video.c wd76c10.c \
|
||||
vid_wy700.c x86seg.c x87.c xtide.c sound_dbopl.cc \
|
||||
sound_resid.cc dosbox/cdrom_image.cpp dosbox/dbopl.cpp \
|
||||
dosbox/nukedopl.cpp dosbox/vid_cga_comp.c resid-fp/convolve.cc \
|
||||
resid-fp/convolve-sse.cc resid-fp/envelope.cc \
|
||||
resid-fp/extfilt.cc resid-fp/filter.cc resid-fp/pot.cc \
|
||||
resid-fp/sid.cc resid-fp/voice.cc resid-fp/wave6581_PS_.cc \
|
||||
|
|
@ -648,6 +663,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-codegen_ops.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-codegen_timing_486.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-codegen_timing_686.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-codegen_timing_common.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-codegen_timing_pentium.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-codegen_timing_winchip.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-codegen_x86-64.Po@am__quote@
|
||||
|
|
@ -667,6 +683,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-disc_sector.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-dma.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-envelope.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-esdi_at.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-extfilt.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-fdc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-fdc37c665.Po@am__quote@
|
||||
|
|
@ -676,6 +693,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-gameport.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-hdd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-hdd_esdi.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-hdd_file.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-headland.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-i430fx.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-i430lx.Po@am__quote@
|
||||
|
|
@ -695,6 +713,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-keyboard_olim24.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-keyboard_pcjr.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-keyboard_xt.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-laserxt.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-lpt.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-mca.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-mcr.Po@am__quote@
|
||||
|
|
@ -707,9 +726,11 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-mouse_serial.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-neat.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-nmi.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-nukedopl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-nvr.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-olivetti_m24.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-opti495.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-paths.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-pc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-pci.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-pic.Po@am__quote@
|
||||
|
|
@ -726,6 +747,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-scat.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-serial.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-sid.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-sio.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-sis496.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-sound.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-sound_ad1848.Po@am__quote@
|
||||
|
|
@ -814,17 +836,21 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-config_sel.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-deviceconfig.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-dialogbox.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-glslp-parser.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-main.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-resources.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-sdl2-display.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-sdl2-hdconf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-sdl2-joystick.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-sdl2-keyboard.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-sdl2-midi.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-sdl2-mouse.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-sdl2-status.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-sdl2-video-gl3.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-sdl2-video-renderer.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-sdl2-video.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-sdl2.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-shader_man.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-shaderconfig.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-status.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-thread.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcem-wx-utils.Po@am__quote@
|
||||
|
|
@ -1028,6 +1054,20 @@ pcem-codegen_timing_686.obj: codegen_timing_686.c
|
|||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-codegen_timing_686.obj `if test -f 'codegen_timing_686.c'; then $(CYGPATH_W) 'codegen_timing_686.c'; else $(CYGPATH_W) '$(srcdir)/codegen_timing_686.c'; fi`
|
||||
|
||||
pcem-codegen_timing_common.o: codegen_timing_common.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-codegen_timing_common.o -MD -MP -MF $(DEPDIR)/pcem-codegen_timing_common.Tpo -c -o pcem-codegen_timing_common.o `test -f 'codegen_timing_common.c' || echo '$(srcdir)/'`codegen_timing_common.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-codegen_timing_common.Tpo $(DEPDIR)/pcem-codegen_timing_common.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='codegen_timing_common.c' object='pcem-codegen_timing_common.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-codegen_timing_common.o `test -f 'codegen_timing_common.c' || echo '$(srcdir)/'`codegen_timing_common.c
|
||||
|
||||
pcem-codegen_timing_common.obj: codegen_timing_common.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-codegen_timing_common.obj -MD -MP -MF $(DEPDIR)/pcem-codegen_timing_common.Tpo -c -o pcem-codegen_timing_common.obj `if test -f 'codegen_timing_common.c'; then $(CYGPATH_W) 'codegen_timing_common.c'; else $(CYGPATH_W) '$(srcdir)/codegen_timing_common.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-codegen_timing_common.Tpo $(DEPDIR)/pcem-codegen_timing_common.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='codegen_timing_common.c' object='pcem-codegen_timing_common.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-codegen_timing_common.obj `if test -f 'codegen_timing_common.c'; then $(CYGPATH_W) 'codegen_timing_common.c'; else $(CYGPATH_W) '$(srcdir)/codegen_timing_common.c'; fi`
|
||||
|
||||
pcem-codegen_timing_pentium.o: codegen_timing_pentium.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-codegen_timing_pentium.o -MD -MP -MF $(DEPDIR)/pcem-codegen_timing_pentium.Tpo -c -o pcem-codegen_timing_pentium.o `test -f 'codegen_timing_pentium.c' || echo '$(srcdir)/'`codegen_timing_pentium.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-codegen_timing_pentium.Tpo $(DEPDIR)/pcem-codegen_timing_pentium.Po
|
||||
|
|
@ -1210,6 +1250,20 @@ pcem-dma.obj: dma.c
|
|||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-dma.obj `if test -f 'dma.c'; then $(CYGPATH_W) 'dma.c'; else $(CYGPATH_W) '$(srcdir)/dma.c'; fi`
|
||||
|
||||
pcem-esdi_at.o: esdi_at.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-esdi_at.o -MD -MP -MF $(DEPDIR)/pcem-esdi_at.Tpo -c -o pcem-esdi_at.o `test -f 'esdi_at.c' || echo '$(srcdir)/'`esdi_at.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-esdi_at.Tpo $(DEPDIR)/pcem-esdi_at.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='esdi_at.c' object='pcem-esdi_at.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-esdi_at.o `test -f 'esdi_at.c' || echo '$(srcdir)/'`esdi_at.c
|
||||
|
||||
pcem-esdi_at.obj: esdi_at.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-esdi_at.obj -MD -MP -MF $(DEPDIR)/pcem-esdi_at.Tpo -c -o pcem-esdi_at.obj `if test -f 'esdi_at.c'; then $(CYGPATH_W) 'esdi_at.c'; else $(CYGPATH_W) '$(srcdir)/esdi_at.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-esdi_at.Tpo $(DEPDIR)/pcem-esdi_at.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='esdi_at.c' object='pcem-esdi_at.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-esdi_at.obj `if test -f 'esdi_at.c'; then $(CYGPATH_W) 'esdi_at.c'; else $(CYGPATH_W) '$(srcdir)/esdi_at.c'; fi`
|
||||
|
||||
pcem-fdc.o: fdc.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-fdc.o -MD -MP -MF $(DEPDIR)/pcem-fdc.Tpo -c -o pcem-fdc.o `test -f 'fdc.c' || echo '$(srcdir)/'`fdc.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-fdc.Tpo $(DEPDIR)/pcem-fdc.Po
|
||||
|
|
@ -1308,6 +1362,20 @@ pcem-hdd_esdi.obj: hdd_esdi.c
|
|||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-hdd_esdi.obj `if test -f 'hdd_esdi.c'; then $(CYGPATH_W) 'hdd_esdi.c'; else $(CYGPATH_W) '$(srcdir)/hdd_esdi.c'; fi`
|
||||
|
||||
pcem-hdd_file.o: hdd_file.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-hdd_file.o -MD -MP -MF $(DEPDIR)/pcem-hdd_file.Tpo -c -o pcem-hdd_file.o `test -f 'hdd_file.c' || echo '$(srcdir)/'`hdd_file.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-hdd_file.Tpo $(DEPDIR)/pcem-hdd_file.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hdd_file.c' object='pcem-hdd_file.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-hdd_file.o `test -f 'hdd_file.c' || echo '$(srcdir)/'`hdd_file.c
|
||||
|
||||
pcem-hdd_file.obj: hdd_file.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-hdd_file.obj -MD -MP -MF $(DEPDIR)/pcem-hdd_file.Tpo -c -o pcem-hdd_file.obj `if test -f 'hdd_file.c'; then $(CYGPATH_W) 'hdd_file.c'; else $(CYGPATH_W) '$(srcdir)/hdd_file.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-hdd_file.Tpo $(DEPDIR)/pcem-hdd_file.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hdd_file.c' object='pcem-hdd_file.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-hdd_file.obj `if test -f 'hdd_file.c'; then $(CYGPATH_W) 'hdd_file.c'; else $(CYGPATH_W) '$(srcdir)/hdd_file.c'; fi`
|
||||
|
||||
pcem-headland.o: headland.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-headland.o -MD -MP -MF $(DEPDIR)/pcem-headland.Tpo -c -o pcem-headland.o `test -f 'headland.c' || echo '$(srcdir)/'`headland.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-headland.Tpo $(DEPDIR)/pcem-headland.Po
|
||||
|
|
@ -1574,6 +1642,20 @@ pcem-keyboard_xt.obj: keyboard_xt.c
|
|||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-keyboard_xt.obj `if test -f 'keyboard_xt.c'; then $(CYGPATH_W) 'keyboard_xt.c'; else $(CYGPATH_W) '$(srcdir)/keyboard_xt.c'; fi`
|
||||
|
||||
pcem-laserxt.o: laserxt.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-laserxt.o -MD -MP -MF $(DEPDIR)/pcem-laserxt.Tpo -c -o pcem-laserxt.o `test -f 'laserxt.c' || echo '$(srcdir)/'`laserxt.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-laserxt.Tpo $(DEPDIR)/pcem-laserxt.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='laserxt.c' object='pcem-laserxt.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-laserxt.o `test -f 'laserxt.c' || echo '$(srcdir)/'`laserxt.c
|
||||
|
||||
pcem-laserxt.obj: laserxt.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-laserxt.obj -MD -MP -MF $(DEPDIR)/pcem-laserxt.Tpo -c -o pcem-laserxt.obj `if test -f 'laserxt.c'; then $(CYGPATH_W) 'laserxt.c'; else $(CYGPATH_W) '$(srcdir)/laserxt.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-laserxt.Tpo $(DEPDIR)/pcem-laserxt.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='laserxt.c' object='pcem-laserxt.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-laserxt.obj `if test -f 'laserxt.c'; then $(CYGPATH_W) 'laserxt.c'; else $(CYGPATH_W) '$(srcdir)/laserxt.c'; fi`
|
||||
|
||||
pcem-lpt.o: lpt.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-lpt.o -MD -MP -MF $(DEPDIR)/pcem-lpt.Tpo -c -o pcem-lpt.o `test -f 'lpt.c' || echo '$(srcdir)/'`lpt.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-lpt.Tpo $(DEPDIR)/pcem-lpt.Po
|
||||
|
|
@ -1784,6 +1866,20 @@ pcem-opti495.obj: opti495.c
|
|||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-opti495.obj `if test -f 'opti495.c'; then $(CYGPATH_W) 'opti495.c'; else $(CYGPATH_W) '$(srcdir)/opti495.c'; fi`
|
||||
|
||||
pcem-paths.o: paths.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-paths.o -MD -MP -MF $(DEPDIR)/pcem-paths.Tpo -c -o pcem-paths.o `test -f 'paths.c' || echo '$(srcdir)/'`paths.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-paths.Tpo $(DEPDIR)/pcem-paths.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='paths.c' object='pcem-paths.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-paths.o `test -f 'paths.c' || echo '$(srcdir)/'`paths.c
|
||||
|
||||
pcem-paths.obj: paths.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-paths.obj -MD -MP -MF $(DEPDIR)/pcem-paths.Tpo -c -o pcem-paths.obj `if test -f 'paths.c'; then $(CYGPATH_W) 'paths.c'; else $(CYGPATH_W) '$(srcdir)/paths.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-paths.Tpo $(DEPDIR)/pcem-paths.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='paths.c' object='pcem-paths.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-paths.obj `if test -f 'paths.c'; then $(CYGPATH_W) 'paths.c'; else $(CYGPATH_W) '$(srcdir)/paths.c'; fi`
|
||||
|
||||
pcem-pc.o: pc.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-pc.o -MD -MP -MF $(DEPDIR)/pcem-pc.Tpo -c -o pcem-pc.o `test -f 'pc.c' || echo '$(srcdir)/'`pc.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-pc.Tpo $(DEPDIR)/pcem-pc.Po
|
||||
|
|
@ -1980,6 +2076,20 @@ pcem-serial.obj: serial.c
|
|||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-serial.obj `if test -f 'serial.c'; then $(CYGPATH_W) 'serial.c'; else $(CYGPATH_W) '$(srcdir)/serial.c'; fi`
|
||||
|
||||
pcem-sio.o: sio.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-sio.o -MD -MP -MF $(DEPDIR)/pcem-sio.Tpo -c -o pcem-sio.o `test -f 'sio.c' || echo '$(srcdir)/'`sio.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-sio.Tpo $(DEPDIR)/pcem-sio.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sio.c' object='pcem-sio.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-sio.o `test -f 'sio.c' || echo '$(srcdir)/'`sio.c
|
||||
|
||||
pcem-sio.obj: sio.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-sio.obj -MD -MP -MF $(DEPDIR)/pcem-sio.Tpo -c -o pcem-sio.obj `if test -f 'sio.c'; then $(CYGPATH_W) 'sio.c'; else $(CYGPATH_W) '$(srcdir)/sio.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-sio.Tpo $(DEPDIR)/pcem-sio.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sio.c' object='pcem-sio.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-sio.obj `if test -f 'sio.c'; then $(CYGPATH_W) 'sio.c'; else $(CYGPATH_W) '$(srcdir)/sio.c'; fi`
|
||||
|
||||
pcem-sis496.o: sis496.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-sis496.o -MD -MP -MF $(DEPDIR)/pcem-sis496.Tpo -c -o pcem-sis496.o `test -f 'sis496.c' || echo '$(srcdir)/'`sis496.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-sis496.Tpo $(DEPDIR)/pcem-sis496.Po
|
||||
|
|
@ -3100,20 +3210,6 @@ pcem-wx-config.obj: wx-config.c
|
|||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-wx-config.obj `if test -f 'wx-config.c'; then $(CYGPATH_W) 'wx-config.c'; else $(CYGPATH_W) '$(srcdir)/wx-config.c'; fi`
|
||||
|
||||
pcem-wx-sdl2-hdconf.o: wx-sdl2-hdconf.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-wx-sdl2-hdconf.o -MD -MP -MF $(DEPDIR)/pcem-wx-sdl2-hdconf.Tpo -c -o pcem-wx-sdl2-hdconf.o `test -f 'wx-sdl2-hdconf.c' || echo '$(srcdir)/'`wx-sdl2-hdconf.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-wx-sdl2-hdconf.Tpo $(DEPDIR)/pcem-wx-sdl2-hdconf.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wx-sdl2-hdconf.c' object='pcem-wx-sdl2-hdconf.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-wx-sdl2-hdconf.o `test -f 'wx-sdl2-hdconf.c' || echo '$(srcdir)/'`wx-sdl2-hdconf.c
|
||||
|
||||
pcem-wx-sdl2-hdconf.obj: wx-sdl2-hdconf.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-wx-sdl2-hdconf.obj -MD -MP -MF $(DEPDIR)/pcem-wx-sdl2-hdconf.Tpo -c -o pcem-wx-sdl2-hdconf.obj `if test -f 'wx-sdl2-hdconf.c'; then $(CYGPATH_W) 'wx-sdl2-hdconf.c'; else $(CYGPATH_W) '$(srcdir)/wx-sdl2-hdconf.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-wx-sdl2-hdconf.Tpo $(DEPDIR)/pcem-wx-sdl2-hdconf.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wx-sdl2-hdconf.c' object='pcem-wx-sdl2-hdconf.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-wx-sdl2-hdconf.obj `if test -f 'wx-sdl2-hdconf.c'; then $(CYGPATH_W) 'wx-sdl2-hdconf.c'; else $(CYGPATH_W) '$(srcdir)/wx-sdl2-hdconf.c'; fi`
|
||||
|
||||
pcem-wx-sdl2-status.o: wx-sdl2-status.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-wx-sdl2-status.o -MD -MP -MF $(DEPDIR)/pcem-wx-sdl2-status.Tpo -c -o pcem-wx-sdl2-status.o `test -f 'wx-sdl2-status.c' || echo '$(srcdir)/'`wx-sdl2-status.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-wx-sdl2-status.Tpo $(DEPDIR)/pcem-wx-sdl2-status.Po
|
||||
|
|
@ -3170,6 +3266,62 @@ pcem-wx-sdl2-display.obj: wx-sdl2-display.c
|
|||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-wx-sdl2-display.obj `if test -f 'wx-sdl2-display.c'; then $(CYGPATH_W) 'wx-sdl2-display.c'; else $(CYGPATH_W) '$(srcdir)/wx-sdl2-display.c'; fi`
|
||||
|
||||
pcem-wx-sdl2-video-renderer.o: wx-sdl2-video-renderer.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-wx-sdl2-video-renderer.o -MD -MP -MF $(DEPDIR)/pcem-wx-sdl2-video-renderer.Tpo -c -o pcem-wx-sdl2-video-renderer.o `test -f 'wx-sdl2-video-renderer.c' || echo '$(srcdir)/'`wx-sdl2-video-renderer.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-wx-sdl2-video-renderer.Tpo $(DEPDIR)/pcem-wx-sdl2-video-renderer.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wx-sdl2-video-renderer.c' object='pcem-wx-sdl2-video-renderer.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-wx-sdl2-video-renderer.o `test -f 'wx-sdl2-video-renderer.c' || echo '$(srcdir)/'`wx-sdl2-video-renderer.c
|
||||
|
||||
pcem-wx-sdl2-video-renderer.obj: wx-sdl2-video-renderer.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-wx-sdl2-video-renderer.obj -MD -MP -MF $(DEPDIR)/pcem-wx-sdl2-video-renderer.Tpo -c -o pcem-wx-sdl2-video-renderer.obj `if test -f 'wx-sdl2-video-renderer.c'; then $(CYGPATH_W) 'wx-sdl2-video-renderer.c'; else $(CYGPATH_W) '$(srcdir)/wx-sdl2-video-renderer.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-wx-sdl2-video-renderer.Tpo $(DEPDIR)/pcem-wx-sdl2-video-renderer.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wx-sdl2-video-renderer.c' object='pcem-wx-sdl2-video-renderer.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-wx-sdl2-video-renderer.obj `if test -f 'wx-sdl2-video-renderer.c'; then $(CYGPATH_W) 'wx-sdl2-video-renderer.c'; else $(CYGPATH_W) '$(srcdir)/wx-sdl2-video-renderer.c'; fi`
|
||||
|
||||
pcem-wx-sdl2-video-gl3.o: wx-sdl2-video-gl3.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-wx-sdl2-video-gl3.o -MD -MP -MF $(DEPDIR)/pcem-wx-sdl2-video-gl3.Tpo -c -o pcem-wx-sdl2-video-gl3.o `test -f 'wx-sdl2-video-gl3.c' || echo '$(srcdir)/'`wx-sdl2-video-gl3.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-wx-sdl2-video-gl3.Tpo $(DEPDIR)/pcem-wx-sdl2-video-gl3.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wx-sdl2-video-gl3.c' object='pcem-wx-sdl2-video-gl3.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-wx-sdl2-video-gl3.o `test -f 'wx-sdl2-video-gl3.c' || echo '$(srcdir)/'`wx-sdl2-video-gl3.c
|
||||
|
||||
pcem-wx-sdl2-video-gl3.obj: wx-sdl2-video-gl3.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-wx-sdl2-video-gl3.obj -MD -MP -MF $(DEPDIR)/pcem-wx-sdl2-video-gl3.Tpo -c -o pcem-wx-sdl2-video-gl3.obj `if test -f 'wx-sdl2-video-gl3.c'; then $(CYGPATH_W) 'wx-sdl2-video-gl3.c'; else $(CYGPATH_W) '$(srcdir)/wx-sdl2-video-gl3.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-wx-sdl2-video-gl3.Tpo $(DEPDIR)/pcem-wx-sdl2-video-gl3.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wx-sdl2-video-gl3.c' object='pcem-wx-sdl2-video-gl3.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-wx-sdl2-video-gl3.obj `if test -f 'wx-sdl2-video-gl3.c'; then $(CYGPATH_W) 'wx-sdl2-video-gl3.c'; else $(CYGPATH_W) '$(srcdir)/wx-sdl2-video-gl3.c'; fi`
|
||||
|
||||
pcem-wx-glslp-parser.o: wx-glslp-parser.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-wx-glslp-parser.o -MD -MP -MF $(DEPDIR)/pcem-wx-glslp-parser.Tpo -c -o pcem-wx-glslp-parser.o `test -f 'wx-glslp-parser.c' || echo '$(srcdir)/'`wx-glslp-parser.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-wx-glslp-parser.Tpo $(DEPDIR)/pcem-wx-glslp-parser.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wx-glslp-parser.c' object='pcem-wx-glslp-parser.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-wx-glslp-parser.o `test -f 'wx-glslp-parser.c' || echo '$(srcdir)/'`wx-glslp-parser.c
|
||||
|
||||
pcem-wx-glslp-parser.obj: wx-glslp-parser.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-wx-glslp-parser.obj -MD -MP -MF $(DEPDIR)/pcem-wx-glslp-parser.Tpo -c -o pcem-wx-glslp-parser.obj `if test -f 'wx-glslp-parser.c'; then $(CYGPATH_W) 'wx-glslp-parser.c'; else $(CYGPATH_W) '$(srcdir)/wx-glslp-parser.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-wx-glslp-parser.Tpo $(DEPDIR)/pcem-wx-glslp-parser.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wx-glslp-parser.c' object='pcem-wx-glslp-parser.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-wx-glslp-parser.obj `if test -f 'wx-glslp-parser.c'; then $(CYGPATH_W) 'wx-glslp-parser.c'; else $(CYGPATH_W) '$(srcdir)/wx-glslp-parser.c'; fi`
|
||||
|
||||
pcem-wx-shader_man.o: wx-shader_man.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-wx-shader_man.o -MD -MP -MF $(DEPDIR)/pcem-wx-shader_man.Tpo -c -o pcem-wx-shader_man.o `test -f 'wx-shader_man.c' || echo '$(srcdir)/'`wx-shader_man.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-wx-shader_man.Tpo $(DEPDIR)/pcem-wx-shader_man.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wx-shader_man.c' object='pcem-wx-shader_man.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-wx-shader_man.o `test -f 'wx-shader_man.c' || echo '$(srcdir)/'`wx-shader_man.c
|
||||
|
||||
pcem-wx-shader_man.obj: wx-shader_man.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-wx-shader_man.obj -MD -MP -MF $(DEPDIR)/pcem-wx-shader_man.Tpo -c -o pcem-wx-shader_man.obj `if test -f 'wx-shader_man.c'; then $(CYGPATH_W) 'wx-shader_man.c'; else $(CYGPATH_W) '$(srcdir)/wx-shader_man.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-wx-shader_man.Tpo $(DEPDIR)/pcem-wx-shader_man.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wx-shader_man.c' object='pcem-wx-shader_man.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -c -o pcem-wx-shader_man.obj `if test -f 'wx-shader_man.c'; then $(CYGPATH_W) 'wx-shader_man.c'; else $(CYGPATH_W) '$(srcdir)/wx-shader_man.c'; fi`
|
||||
|
||||
pcem-allegro-gui.o: allegro-gui.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CFLAGS) $(CFLAGS) -MT pcem-allegro-gui.o -MD -MP -MF $(DEPDIR)/pcem-allegro-gui.Tpo -c -o pcem-allegro-gui.o `test -f 'allegro-gui.c' || echo '$(srcdir)/'`allegro-gui.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-allegro-gui.Tpo $(DEPDIR)/pcem-allegro-gui.Po
|
||||
|
|
@ -3450,6 +3602,20 @@ pcem-dbopl.obj: dosbox/dbopl.cpp
|
|||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CXXFLAGS) $(CXXFLAGS) -c -o pcem-dbopl.obj `if test -f 'dosbox/dbopl.cpp'; then $(CYGPATH_W) 'dosbox/dbopl.cpp'; else $(CYGPATH_W) '$(srcdir)/dosbox/dbopl.cpp'; fi`
|
||||
|
||||
pcem-nukedopl.o: dosbox/nukedopl.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CXXFLAGS) $(CXXFLAGS) -MT pcem-nukedopl.o -MD -MP -MF $(DEPDIR)/pcem-nukedopl.Tpo -c -o pcem-nukedopl.o `test -f 'dosbox/nukedopl.cpp' || echo '$(srcdir)/'`dosbox/nukedopl.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-nukedopl.Tpo $(DEPDIR)/pcem-nukedopl.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dosbox/nukedopl.cpp' object='pcem-nukedopl.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CXXFLAGS) $(CXXFLAGS) -c -o pcem-nukedopl.o `test -f 'dosbox/nukedopl.cpp' || echo '$(srcdir)/'`dosbox/nukedopl.cpp
|
||||
|
||||
pcem-nukedopl.obj: dosbox/nukedopl.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CXXFLAGS) $(CXXFLAGS) -MT pcem-nukedopl.obj -MD -MP -MF $(DEPDIR)/pcem-nukedopl.Tpo -c -o pcem-nukedopl.obj `if test -f 'dosbox/nukedopl.cpp'; then $(CYGPATH_W) 'dosbox/nukedopl.cpp'; else $(CYGPATH_W) '$(srcdir)/dosbox/nukedopl.cpp'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-nukedopl.Tpo $(DEPDIR)/pcem-nukedopl.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dosbox/nukedopl.cpp' object='pcem-nukedopl.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CXXFLAGS) $(CXXFLAGS) -c -o pcem-nukedopl.obj `if test -f 'dosbox/nukedopl.cpp'; then $(CYGPATH_W) 'dosbox/nukedopl.cpp'; else $(CYGPATH_W) '$(srcdir)/dosbox/nukedopl.cpp'; fi`
|
||||
|
||||
pcem-convolve.o: resid-fp/convolve.cc
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CXXFLAGS) $(CXXFLAGS) -MT pcem-convolve.o -MD -MP -MF $(DEPDIR)/pcem-convolve.Tpo -c -o pcem-convolve.o `test -f 'resid-fp/convolve.cc' || echo '$(srcdir)/'`resid-fp/convolve.cc
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-convolve.Tpo $(DEPDIR)/pcem-convolve.Po
|
||||
|
|
@ -3786,6 +3952,20 @@ pcem-wx-resources.obj: wx-resources.cpp
|
|||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CXXFLAGS) $(CXXFLAGS) -c -o pcem-wx-resources.obj `if test -f 'wx-resources.cpp'; then $(CYGPATH_W) 'wx-resources.cpp'; else $(CYGPATH_W) '$(srcdir)/wx-resources.cpp'; fi`
|
||||
|
||||
pcem-wx-shaderconfig.o: wx-shaderconfig.cc
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CXXFLAGS) $(CXXFLAGS) -MT pcem-wx-shaderconfig.o -MD -MP -MF $(DEPDIR)/pcem-wx-shaderconfig.Tpo -c -o pcem-wx-shaderconfig.o `test -f 'wx-shaderconfig.cc' || echo '$(srcdir)/'`wx-shaderconfig.cc
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-wx-shaderconfig.Tpo $(DEPDIR)/pcem-wx-shaderconfig.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='wx-shaderconfig.cc' object='pcem-wx-shaderconfig.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CXXFLAGS) $(CXXFLAGS) -c -o pcem-wx-shaderconfig.o `test -f 'wx-shaderconfig.cc' || echo '$(srcdir)/'`wx-shaderconfig.cc
|
||||
|
||||
pcem-wx-shaderconfig.obj: wx-shaderconfig.cc
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CXXFLAGS) $(CXXFLAGS) -MT pcem-wx-shaderconfig.obj -MD -MP -MF $(DEPDIR)/pcem-wx-shaderconfig.Tpo -c -o pcem-wx-shaderconfig.obj `if test -f 'wx-shaderconfig.cc'; then $(CYGPATH_W) 'wx-shaderconfig.cc'; else $(CYGPATH_W) '$(srcdir)/wx-shaderconfig.cc'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcem-wx-shaderconfig.Tpo $(DEPDIR)/pcem-wx-shaderconfig.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='wx-shaderconfig.cc' object='pcem-wx-shaderconfig.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pcem_CXXFLAGS) $(CXXFLAGS) -c -o pcem-wx-shaderconfig.obj `if test -f 'wx-shaderconfig.cc'; then $(CYGPATH_W) 'wx-shaderconfig.cc'; else $(CYGPATH_W) '$(srcdir)/wx-shaderconfig.cc'; fi`
|
||||
|
||||
.cpp.o:
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ CPP = g++
|
|||
CC = gcc
|
||||
WXRC = wxrc
|
||||
CFLAGS = -O3 -fomit-frame-pointer -msse2 -m32 $(shell wx-config --cxxflags) $(shell sdl2-config --cflags)
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
OBJ = 386.o 386_dynarec.o 386_dynarec_ops.o 808x.o acer386sx.o ali1429.o amstrad.o cdrom-ioctl-linux.o cdrom-image.o cdrom-null.o \
|
||||
codegen.o codegen_ops.o codegen_timing_486.o codegen_timing_686.o codegen_timing_common.o codegen_timing_pentium.o codegen_timing_winchip.o codegen_x86.c compaq.o config.o cpu.o \
|
||||
dac.o dells200.o device.o disc.o disc_fdi.o disc_img.o disc_sector.o dma.o esdi_at.o fdc.o fdc37c665.o fdd.o fdi2raw.o gameport.o \
|
||||
|
|
@ -21,12 +22,12 @@ vid_stg_ramdac.o vid_svga.o vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui
|
|||
vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o vid_vga.o vid_voodoo.o vid_wy700.o video.o wd76c10.o \
|
||||
x86seg.o x87.o xtide.o sound_dbopl.o sound_resid.o \
|
||||
wx-main.o wx-config_sel.o wx-dialogbox.o wx-utils.o wx-app.o wx-sdl2-joystick.o wx-sdl2-mouse.o wx-sdl2-keyboard.o wx-sdl2-video.o wx-sdl2-midi.o \
|
||||
wx-sdl2.o wx-config.o wx-deviceconfig.o wx-sdl2-hdconf.o wx-status.o wx-sdl2-status.o wx-resources.o wx-thread.o wx-common.o wx-sdl2-display.o
|
||||
wx-sdl2.o wx-config.o wx-deviceconfig.o wx-status.o wx-sdl2-status.o wx-resources.o wx-thread.o wx-common.o wx-sdl2-display.o \
|
||||
wx-sdl2-video-renderer.o wx-sdl2-video-gl3.o wx-glslp-parser.o wx-shader_man.o wx-shaderconfig.o
|
||||
DBOBJ = cdrom_image.o dbopl.o nukedopl.o vid_cga_comp.o
|
||||
SIDOBJ = convolve.o convolve-sse.o envelope.o extfilt.o filter.o pot.o sid.o voice.o wave6581__ST.o wave6581_P_T.o wave6581_PS_.o wave6581_PST.o wave8580__ST.o wave8580_P_T.o wave8580_PS_.o wave8580_PST.o wave.o
|
||||
|
||||
|
||||
LIBS = -lopenal -lstdc++ -lpthread -lm $(shell wx-config --libs) $(shell sdl2-config --libs)
|
||||
LIBS = -lopenal -lstdc++ -lpthread -lm $(shell wx-config --libs) $(shell sdl2-config --libs) -lGL
|
||||
|
||||
PCem-wx-SDL2: $(OBJ) $(DBOBJ) $(SIDOBJ)
|
||||
$(CC) $(OBJ) $(DBOBJ) $(SIDOBJ) -o "PCem-wx-SDL2" $(LIBS)
|
||||
|
|
@ -45,7 +46,7 @@ wx-resources.o : pc.xrc
|
|||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
%.o : %.cc
|
||||
$(CPP) $(CFLAGS) -c $<
|
||||
$(CPP) $(CXXFLAGS) -c $<
|
||||
|
||||
%.o : %.cpp
|
||||
$(CPP) $(CFLAGS) -c $<
|
||||
$(CPP) $(CXXFLAGS) -c $<
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ VPATH = . dosbox resid-fp
|
|||
CPP = g++
|
||||
CC = gcc
|
||||
WXRC = wxrc
|
||||
CFLAGS = -Doff64_t=__off64_t -O3 -fomit-frame-pointer -msse2 -m64 $(shell wx-config --cxxflags) $(shell sdl2-config --cflags)
|
||||
CFLAGS = -O3 -fomit-frame-pointer -msse2 -m64 $(shell wx-config --cxxflags) $(shell sdl2-config --cflags)
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
OBJ = 386.o 386_dynarec.o 386_dynarec_ops.o 808x.o acer386sx.o ali1429.o amstrad.o cdrom-ioctl-linux.o cdrom-image.o cdrom-null.o \
|
||||
codegen.o codegen_ops.o codegen_timing_486.o codegen_timing_686.o codegen_timing_common.o codegen_timing_pentium.o codegen_timing_winchip.o codegen_x86-64.c compaq.o config.o cpu.o \
|
||||
dac.o dells200.o device.o disc.o disc_fdi.o disc_img.o disc_sector.o dma.o esdi_at.o fdc.o fdc37c665.o fdd.o fdi2raw.o gameport.o \
|
||||
|
|
@ -21,12 +22,12 @@ vid_stg_ramdac.o vid_svga.o vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui
|
|||
vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o vid_vga.o vid_voodoo.o vid_wy700.o video.o wd76c10.o \
|
||||
x86seg.o x87.o xtide.o sound_dbopl.o sound_resid.o \
|
||||
wx-main.o wx-config_sel.o wx-dialogbox.o wx-utils.o wx-app.o wx-sdl2-joystick.o wx-sdl2-mouse.o wx-sdl2-keyboard.o wx-sdl2-video.o wx-sdl2-midi.o \
|
||||
wx-sdl2.o wx-config.o wx-deviceconfig.o wx-sdl2-hdconf.o wx-status.o wx-sdl2-status.o wx-resources.o wx-thread.o wx-common.o wx-sdl2-display.o
|
||||
wx-sdl2.o wx-config.o wx-deviceconfig.o wx-status.o wx-sdl2-status.o wx-resources.o wx-thread.o wx-common.o wx-sdl2-display.o \
|
||||
wx-sdl2-video-renderer.o wx-sdl2-video-gl3.o wx-glslp-parser.o wx-shader_man.o wx-shaderconfig.o
|
||||
DBOBJ = cdrom_image.o dbopl.o nukedopl.o vid_cga_comp.o
|
||||
SIDOBJ = convolve.o convolve-sse.o envelope.o extfilt.o filter.o pot.o sid.o voice.o wave6581__ST.o wave6581_P_T.o wave6581_PS_.o wave6581_PST.o wave8580__ST.o wave8580_P_T.o wave8580_PS_.o wave8580_PST.o wave.o
|
||||
|
||||
|
||||
LIBS = -lopenal -lstdc++ -lpthread -lm $(shell wx-config --libs) $(shell sdl2-config --libs)
|
||||
LIBS = -lopenal -lstdc++ -lpthread -lm $(shell wx-config --libs) $(shell sdl2-config --libs) -lGL
|
||||
|
||||
PCem64-wx-SDL2: $(OBJ) $(DBOBJ) $(SIDOBJ)
|
||||
$(CC) $(OBJ) $(DBOBJ) $(SIDOBJ) -o "PCem64-wx-SDL2" $(LIBS)
|
||||
|
|
@ -45,7 +46,7 @@ wx-resources.o : pc.xrc
|
|||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
%.o : %.cc
|
||||
$(CPP) $(CFLAGS) -c $<
|
||||
$(CPP) $(CXXFLAGS) -c $<
|
||||
|
||||
%.o : %.cpp
|
||||
$(CPP) $(CFLAGS) -c $<
|
||||
$(CPP) $(CXXFLAGS) -c $<
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
VPATH = . dosbox resid-fp
|
||||
CPP = g++
|
||||
CC = gcc
|
||||
WXRC = wxrc
|
||||
CFLAGS = -DRELEASE_BUILD -O3 -march=i686 -fomit-frame-pointer -msse2 -mstackrealign
|
||||
WINDRES = windres.exe
|
||||
WXRC = ../utils/wx/wxrc.exe
|
||||
WXVERSION = 31
|
||||
WXINCLUDE = C:/MinGW/include/wx/
|
||||
CFLAGS = -O3 -march=i686 -fomit-frame-pointer -msse2 -mstackrealign -Werror -fno-strict-aliasing -IC:\MinGW\lib\mswu
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
OBJ = 386.o 386_dynarec.o 386_dynarec_ops.o 808x.o acer386sx.o ali1429.o amstrad.o cdrom-ioctl.o cdrom-image.o \
|
||||
codegen.o codegen_ops.o codegen_timing_486.o codegen_timing_686.o codegen_timing_common.o codegen_timing_pentium.o codegen_timing_winchip.o codegen_x86.o compaq.o config.o cpu.o dac.o \
|
||||
device.o dells200.o disc.o disc_fdi.o disc_img.o disc_sector.o dma.o esdi_at.o fdc.o fdc37c665.o fdd.o fdi2raw.o gameport.o hdd.o hdd_esdi.o hdd_file.o headland.o i430lx.o i430fx.o \
|
||||
|
|
@ -18,29 +22,38 @@ OBJ = 386.o 386_dynarec.o 386_dynarec_ops.o 808x.o acer386sx.o ali1429.o amstrad
|
|||
vid_olivetti_m24.o vid_oti067.o vid_paradise.o vid_pc1512.o vid_pc1640.o vid_pc200.o \
|
||||
vid_pcjr.o vid_ps1_svga.o vid_s3.o vid_s3_virge.o vid_sdac_ramdac.o vid_stg_ramdac.o vid_svga.o \
|
||||
vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui9440.o vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o \
|
||||
vid_vga.o vid_voodoo.o vid_wy700.o video.o wd76c10.o x86seg.o x87.o xtide.o \
|
||||
wx-main.o wx-config_sel.o wx-dialogbox.o wx-utils.o wx-app.o wx-sdl2-joystick.o wx-sdl2-mouse.o wx-sdl2-keyboard.o wx-sdl2-video.o wx-sdl2-midi.o \
|
||||
wx-sdl2.o wx-config.o wx-deviceconfig.o wx-sdl2-hdconf.o wx-status.o wx-sdl2-status.o wx-resources.o wx-thread.o wx-common.o wx-sdl2-display.o
|
||||
vid_vga.o vid_voodoo.o vid_wy700.o video.o wd76c10.o x86seg.o x87.o xtide.o win-midi.o \
|
||||
wx-main.o wx-config_sel.o wx-dialogbox.o wx-utils.o wx-app.o wx-sdl2-joystick.o wx-sdl2-mouse.o wx-sdl2-keyboard.o wx-sdl2-video.o \
|
||||
wx-sdl2.o wx-config.o wx-deviceconfig.o wx-status.o wx-sdl2-status.o wx-resources.o wx-thread.o wx-common.o wx-sdl2-display-win.o \
|
||||
wx-sdl2-video-renderer.o wx-sdl2-video-gl3.o wx-glslp-parser.o wx-shader_man.o wx-shaderconfig.o wx.res
|
||||
DBOBJ = cdrom_image.o dbopl.o nukedopl.o vid_cga_comp.o
|
||||
SIDOBJ = convolve.o convolve-sse.o envelope.o extfilt.o filter.o pot.o sid.o voice.o wave6581__ST.o wave6581_P_T.o wave6581_PS_.o wave6581_PST.o wave8580__ST.o wave8580_P_T.o wave8580_PS_.o wave8580_PST.o wave.o
|
||||
|
||||
|
||||
LIBS = -mwindows -lopenal32 -lstdc++ -lwxbase31u -lwxmsw31u_core -lwxmsw31u_xrc -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static
|
||||
LIBS = -Wl,--subsystem,windows -mthreads -mwindows -lwxmsw$(WXVERSION)u_xrc -lwxmsw$(WXVERSION)u_html -lwxmsw$(WXVERSION)u_adv -lwxbase$(WXVERSION)u_xml -lwxmsw$(WXVERSION)u_core -lwxbase$(WXVERSION)u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -lcomdlg32 -lwinspool -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lmingw32 -lopengl32 -lopenal32 -lstdc++ -lSDL2main -lSDL2 -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc
|
||||
|
||||
PCem-wx-SDL2.exe: $(OBJ) $(DBOBJ) $(SIDOBJ)
|
||||
$(CC) $(OBJ) $(DBOBJ) $(SIDOBJ) -o "PCem-wx-SDL2.exe" $(LIBS)
|
||||
strip -s PCem-wx-SDL2.exe
|
||||
|
||||
all : PCem-wx-SDL2.exe
|
||||
|
||||
clean :
|
||||
del *.o
|
||||
del PCem-wx-SDL2.exe
|
||||
rm *.o
|
||||
rm PCem-wx-SDL2.exe
|
||||
rm *.res
|
||||
|
||||
wx-resources.o : pc.xrc
|
||||
$(WXRC) -c pc.xrc -o wx-resources.cpp
|
||||
$(CPP) $(CXXFLAGS) -c wx-resources.cpp
|
||||
|
||||
%.o : %.c
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
%.o : %.cc
|
||||
$(CPP) $(CFLAGS) -c $<
|
||||
$(CPP) $(CXXFLAGS) -c $<
|
||||
|
||||
%.o : %.cpp
|
||||
$(CPP) $(CFLAGS) -c $<
|
||||
$(CPP) $(CXXFLAGS) -c $<
|
||||
|
||||
wx.res: wx.rc
|
||||
$(WINDRES) -I$(WXINCLUDE)/../ -i wx.rc --input-format=rc -o wx.res -O coff
|
||||
|
|
|
|||
|
|
@ -21,12 +21,12 @@ vid_stg_ramdac.o vid_svga.o vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui
|
|||
vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o vid_vga.o vid_voodoo.o vid_wy700.o video.o wd76c10.o \
|
||||
x86seg.o x87.o xtide.o sound_dbopl.o sound_resid.o \
|
||||
wx-main.o wx-config_sel.o wx-dialogbox.o wx-utils.o wx-app.o wx-sdl2-joystick.o wx-sdl2-mouse.o wx-sdl2-keyboard.o wx-sdl2-video.o wx-sdl2-midi.o \
|
||||
wx-sdl2.o wx-config.o wx-deviceconfig.o wx-sdl2-hdconf.o wx-status.o wx-sdl2-status.o wx-resources.o wx-thread.o wx-common.o wx-sdl2-display.o
|
||||
wx-sdl2.o wx-config.o wx-deviceconfig.o wx-status.o wx-sdl2-status.o wx-resources.o wx-thread.o wx-common.o wx-sdl2-display.o \
|
||||
wx-sdl2-video-renderer.o wx-sdl2-video-gl3.o wx-glslp-parser.o wx-shader_man.o wx-shaderconfig.o
|
||||
DBOBJ = cdrom_image.o dbopl.o nukedopl.o vid_cga_comp.o
|
||||
SIDOBJ = convolve.o convolve-sse.o envelope.o extfilt.o filter.o pot.o sid.o voice.o wave6581__ST.o wave6581_P_T.o wave6581_PS_.o wave6581_PST.o wave8580__ST.o wave8580_P_T.o wave8580_PS_.o wave8580_PST.o wave.o
|
||||
|
||||
|
||||
LIBS = -lopenal -lstdc++ -lpthread -lm $(shell wx-config --libs) $(shell sdl2-config --libs) -L/usr/local/opt/openal-soft/lib
|
||||
LIBS = -lopenal -lstdc++ -lpthread -lm $(shell wx-config --libs) $(shell sdl2-config --libs) -L/usr/local/opt/openal-soft/lib -framework OpenGL
|
||||
|
||||
PCem64-wx-SDL2: $(OBJ) $(DBOBJ) $(SIDOBJ)
|
||||
$(CC) $(OBJ) $(DBOBJ) $(SIDOBJ) -o "PCem64-wx-SDL2" $(LIBS)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include "ibm.h"
|
||||
#include "ide.h"
|
||||
#include "cdrom-ioctl.h"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
static ATAPI ioctl_atapi;
|
||||
|
||||
int old_cdrom_drive;
|
||||
|
||||
void ioctl_audio_callback(int16_t *output, int len)
|
||||
{
|
||||
memset(output, 0, len * 2);
|
||||
|
|
|
|||
76
src/config.c
|
|
@ -98,6 +98,43 @@ void config_free(int is_global)
|
|||
}
|
||||
}
|
||||
|
||||
int config_free_section(int is_global, char *name)
|
||||
{
|
||||
section_t *current_section, *prev_section;
|
||||
list_t *head = is_global ? &global_config_head : &machine_config_head;
|
||||
current_section = (section_t *)head->next;
|
||||
prev_section = 0;
|
||||
|
||||
while (current_section)
|
||||
{
|
||||
section_t *next_section = (section_t *)current_section->list.next;
|
||||
if (!strcmp(current_section->name, name))
|
||||
{
|
||||
entry_t *current_entry;
|
||||
|
||||
current_entry = (entry_t *)current_section->entry_head.next;
|
||||
|
||||
while (current_entry)
|
||||
{
|
||||
entry_t *next_entry = (entry_t *)current_entry->list.next;
|
||||
|
||||
free(current_entry);
|
||||
current_entry = next_entry;
|
||||
}
|
||||
|
||||
free(current_section);
|
||||
if (!prev_section)
|
||||
head->next = (list_t*)next_section;
|
||||
else
|
||||
prev_section->list.next = (list_t*)next_section;
|
||||
return 1;
|
||||
}
|
||||
prev_section = current_section;
|
||||
current_section = next_section;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void config_load(int is_global, char *fn)
|
||||
{
|
||||
FILE *f = fopen(fn, "rt");
|
||||
|
|
@ -279,6 +316,27 @@ int config_get_int(int is_global, char *head, char *name, int def)
|
|||
return value;
|
||||
}
|
||||
|
||||
float config_get_float(int is_global, char *head, char *name, float def)
|
||||
{
|
||||
section_t *section;
|
||||
entry_t *entry;
|
||||
float value;
|
||||
|
||||
section = find_section(head, is_global);
|
||||
|
||||
if (!section)
|
||||
return def;
|
||||
|
||||
entry = find_entry(section, name);
|
||||
|
||||
if (!entry)
|
||||
return def;
|
||||
|
||||
sscanf(entry->data, "%f", &value);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
char *config_get_string(int is_global, char *head, char *name, char *def)
|
||||
{
|
||||
section_t *section;
|
||||
|
|
@ -315,6 +373,24 @@ void config_set_int(int is_global, char *head, char *name, int val)
|
|||
sprintf(entry->data, "%i", val);
|
||||
}
|
||||
|
||||
void config_set_float(int is_global, char *head, char *name, float val)
|
||||
{
|
||||
section_t *section;
|
||||
entry_t *entry;
|
||||
|
||||
section = find_section(head, is_global);
|
||||
|
||||
if (!section)
|
||||
section = create_section(head, is_global);
|
||||
|
||||
entry = find_entry(section, name);
|
||||
|
||||
if (!entry)
|
||||
entry = create_entry(section, name);
|
||||
|
||||
sprintf(entry->data, "%f", val);
|
||||
}
|
||||
|
||||
void config_set_string(int is_global, char *head, char *name, char *val)
|
||||
{
|
||||
section_t *section;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
float config_get_float(int is_global, char *head, char *name, float def);
|
||||
int config_get_int(int is_global, char *head, char *name, int def);
|
||||
char *config_get_string(int is_global, char *head, char *name, char *def);
|
||||
void config_set_float(int is_global, char *head, char *name, float val);
|
||||
void config_set_int(int is_global, char *head, char *name, int val);
|
||||
void config_set_string(int is_global, char *head, char *name, char *val);
|
||||
|
||||
void add_config_callback(void (*loadconfig)(), void (*saveconfig)(), void (*onloaded)());
|
||||
int config_free_section(int is_global, char *head);
|
||||
|
||||
void add_config_callback(void(*loadconfig)(), void(*saveconfig)(), void(*onloaded)());
|
||||
|
||||
char *get_filename(char *s);
|
||||
void append_filename(char *dest, char *s1, char *s2, int size);
|
||||
|
|
|
|||
11
src/hdd.c
|
|
@ -53,16 +53,16 @@ int hdd_controller_available(int hdd)
|
|||
return device_available(hdd_controllers[hdd].device);
|
||||
}
|
||||
|
||||
int hdd_controller_current_is_mfm()
|
||||
int hdd_controller_is_mfm(char* internal_name)
|
||||
{
|
||||
int c = 0;
|
||||
|
||||
while (hdd_controllers[c].device)
|
||||
{
|
||||
if (!strcmp(hdd_controller_name, hdd_controllers[c].internal_name))
|
||||
if (!strcmp(internal_name, hdd_controllers[c].internal_name))
|
||||
{
|
||||
hdd_controller_current = c;
|
||||
if (strcmp(hdd_controller_name, "none"))
|
||||
if (strcmp(internal_name, "none"))
|
||||
return hdd_controllers[c].is_mfm;
|
||||
}
|
||||
c++;
|
||||
|
|
@ -71,6 +71,11 @@ int hdd_controller_current_is_mfm()
|
|||
return 0;
|
||||
}
|
||||
|
||||
int hdd_controller_current_is_mfm()
|
||||
{
|
||||
return hdd_controller_is_mfm(hdd_controller_name);
|
||||
}
|
||||
|
||||
void hdd_controller_init(char *internal_name)
|
||||
{
|
||||
int c = 0;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ char *hdd_controller_get_name(int hdd);
|
|||
char *hdd_controller_get_internal_name(int hdd);
|
||||
int hdd_controller_get_flags(int hdd);
|
||||
int hdd_controller_available(int hdd);
|
||||
int hdd_controller_is_mfm(char* internal_name);
|
||||
int hdd_controller_current_is_mfm();
|
||||
void hdd_controller_init(char *internal_name);
|
||||
|
||||
|
|
|
|||
BIN
src/icons/16x16/cd.png
Normal file
|
After Width: | Height: | Size: 835 B |
BIN
src/icons/16x16/computer_add.png
Normal file
|
After Width: | Height: | Size: 783 B |
BIN
src/icons/16x16/computer_delete.png
Normal file
|
After Width: | Height: | Size: 774 B |
BIN
src/icons/16x16/computer_edit.png
Normal file
|
After Width: | Height: | Size: 798 B |
BIN
src/icons/16x16/control_eject.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
src/icons/16x16/control_play_blue.png
Normal file
|
After Width: | Height: | Size: 742 B |
BIN
src/icons/16x16/diskette.png
Normal file
|
After Width: | Height: | Size: 730 B |
BIN
src/icons/16x16/door_out.png
Normal file
|
After Width: | Height: | Size: 763 B |
BIN
src/icons/16x16/drive.png
Normal file
|
After Width: | Height: | Size: 430 B |
BIN
src/icons/16x16/drive_add.png
Normal file
|
After Width: | Height: | Size: 634 B |
BIN
src/icons/16x16/folder.png
Normal file
|
After Width: | Height: | Size: 632 B |
BIN
src/icons/16x16/setting_tools.png
Normal file
|
After Width: | Height: | Size: 1,017 B |
BIN
src/icons/24x24/pause.png
Normal file
|
After Width: | Height: | Size: 635 B |
BIN
src/icons/24x24/play.png
Normal file
|
After Width: | Height: | Size: 758 B |
BIN
src/icons/24x24/refresh.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/icons/24x24/stop.png
Normal file
|
After Width: | Height: | Size: 622 B |
BIN
src/icons/32x32/add.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/icons/32x32/computer_add.png
Normal file
|
After Width: | Height: | Size: 2 KiB |
BIN
src/icons/32x32/computer_delete.png
Normal file
|
After Width: | Height: | Size: 2 KiB |
BIN
src/icons/32x32/computer_edit.png
Normal file
|
After Width: | Height: | Size: 2 KiB |
BIN
src/icons/32x32/control_play_blue.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
src/icons/32x32/delete.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/icons/32x32/door_in.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/icons/32x32/door_out.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/icons/32x32/drive.png
Normal file
|
After Width: | Height: | Size: 869 B |
BIN
src/icons/32x32/motherboard.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/icons/32x32/mouse_pc.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/icons/32x32/setting_tools.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
src/icons/32x32/sound.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/icons/32x32/textfield_rename.png
Normal file
|
After Width: | Height: | Size: 856 B |
BIN
src/icons/32x32/video_mode.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
43
src/icons/svg/pause.svg
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 496.158 496.158" style="enable-background:new 0 0 496.158 496.158;" xml:space="preserve">
|
||||
<path style="fill:#E5AA17;" d="M496.158,248.085c0-137.021-111.07-248.082-248.076-248.082C111.07,0.002,0,111.062,0,248.085
|
||||
c0,137.002,111.07,248.071,248.083,248.071C385.088,496.155,496.158,385.086,496.158,248.085z"/>
|
||||
<g>
|
||||
<path style="fill:#FFFFFF;" d="M223.082,121.066h-60.006c-5.523,0-10,4.479-10,10v234.024c0,5.523,4.477,10,10,10h60.006
|
||||
c5.523,0,10-4.477,10-10V131.066C233.082,125.545,228.605,121.066,223.082,121.066z"/>
|
||||
<path style="fill:#FFFFFF;" d="M333.082,121.066h-60.006c-5.523,0-10,4.479-10,10v234.024c0,5.523,4.477,10,10,10h60.006
|
||||
c5.523,0,10-4.477,10-10V131.066C343.082,125.545,338.605,121.066,333.082,121.066z"/>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
41
src/icons/svg/play-button.svg
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 496.158 496.158" style="enable-background:new 0 0 496.158 496.158;" xml:space="preserve">
|
||||
<path style="fill:#32BEA6;" d="M496.158,248.085c0-137.021-111.07-248.082-248.076-248.082C111.07,0.002,0,111.062,0,248.085
|
||||
c0,137.002,111.07,248.071,248.083,248.071C385.088,496.155,496.158,385.086,496.158,248.085z"/>
|
||||
<path style="fill:#FFFFFF;" d="M370.805,235.242L195.856,127.818c-4.776-2.934-11.061-3.061-15.951-0.322
|
||||
c-4.979,2.785-8.071,8.059-8.071,13.762v214c0,5.693,3.083,10.963,8.046,13.752c2.353,1.32,5.024,2.02,7.725,2.02
|
||||
c2.897,0,5.734-0.797,8.205-2.303l174.947-106.576c4.657-2.836,7.556-7.986,7.565-13.44
|
||||
C378.332,243.258,375.452,238.096,370.805,235.242z"/>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
50
src/icons/svg/refresh.svg
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 496.156 496.156" style="enable-background:new 0 0 496.156 496.156;" xml:space="preserve">
|
||||
<path style="fill:#32BEA6;" d="M0,248.08C0,111.06,111.069,0.002,248.074,0.002c137.013,0,248.082,111.059,248.082,248.078
|
||||
c0,137.005-111.069,248.074-248.082,248.074C111.069,496.154,0,385.085,0,248.08z"/>
|
||||
<g>
|
||||
<path style="fill:#FFFFFF;" d="M428.243,172.149c-10.348,0.023-20.694,0.054-31.042,0.077
|
||||
c-23.272-52.177-68.95-89.871-126.649-98.91c-64.287-10.071-125.816,19.788-162.504,72.312
|
||||
c-16.296,23.326,22.003,45.165,38.16,22.034c50.317-72.037,157.757-65.527,201.907,4.686c-9.559,0.022-19.118,0.046-28.678,0.068
|
||||
c-2.674,0.008-4.574,1.197-5.749,2.877c-1.92,2.058-2.65,5.072-0.639,8.186c18.204,28.25,36.408,56.499,54.616,84.745
|
||||
c3.061,4.747,9.663,4.708,12.696-0.046c18.062-28.338,36.126-56.675,54.188-85.013C437.538,178.48,433.602,172.135,428.243,172.149
|
||||
z"/>
|
||||
<path style="fill:#FFFFFF;" d="M350.353,327.224c-49.927,71.49-156.108,65.63-200.886-3.049c9.161-0.022,18.322-0.046,27.484-0.068
|
||||
c2.666-0.008,4.563-1.19,5.741-2.865c1.924-2.059,2.658-5.072,0.646-8.197c-18.2-28.246-36.405-56.499-54.609-84.741
|
||||
c-3.056-4.751-9.662-4.712-12.695,0.046c-18.063,28.334-36.13,56.671-54.196,85.009c-2.987,4.689,0.948,11.032,6.308,11.017
|
||||
c10.669-0.027,21.337-0.054,32.006-0.08c23.498,51.319,68.777,88.332,125.865,97.275c64.287,10.072,125.816-19.784,162.496-72.312
|
||||
C404.806,325.928,366.508,304.09,350.353,327.224z"/>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
39
src/icons/svg/stop.svg
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 496.158 496.158" style="enable-background:new 0 0 496.158 496.158;" xml:space="preserve">
|
||||
<path style="fill:#E04F5F;" d="M496.158,248.085c0-137.021-111.07-248.082-248.076-248.082C111.07,0.002,0,111.062,0,248.085
|
||||
c0,137.002,111.07,248.071,248.083,248.071C385.088,496.155,496.158,385.086,496.158,248.085z"/>
|
||||
<path style="fill:#FFFFFF;" d="M353.079,133.078h-210c-5.523,0-10,4.479-10,10v210c0,5.523,4.477,10,10,10h210
|
||||
c5.523,0,10-4.477,10-10v-210C363.079,137.557,358.602,133.078,353.079,133.078z"/>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 958 B |
25
src/paths.c
|
|
@ -9,6 +9,7 @@ char default_roms_paths[4096];
|
|||
char default_nvr_path[512];
|
||||
char default_configs_path[512];
|
||||
char default_logs_path[512];
|
||||
char default_screenshots_path[512];
|
||||
|
||||
/* the number of roms paths */
|
||||
int num_roms_paths;
|
||||
|
|
@ -21,6 +22,8 @@ char nvr_path[512];
|
|||
char configs_path[512];
|
||||
/* this is where log-files as stored */
|
||||
char logs_path[512];
|
||||
/* this is where screenshots as stored */
|
||||
char screenshots_path[512];
|
||||
|
||||
char get_path_separator()
|
||||
{
|
||||
|
|
@ -106,6 +109,12 @@ void set_configs_path(char *s)
|
|||
append_slash(configs_path, 512);
|
||||
}
|
||||
|
||||
void set_screenshots_path(char *s)
|
||||
{
|
||||
safe_strncpy(screenshots_path, s, 512);
|
||||
append_slash(screenshots_path, 512);
|
||||
}
|
||||
|
||||
/* set the default roms paths, this makes them permanent */
|
||||
void set_default_roms_paths(char *s)
|
||||
{
|
||||
|
|
@ -134,12 +143,20 @@ void set_default_configs_path(char *s)
|
|||
set_configs_path(s);
|
||||
}
|
||||
|
||||
/* set the default screenshots path, this makes it permanent */
|
||||
void set_default_screenshots_path(char *s)
|
||||
{
|
||||
safe_strncpy(default_screenshots_path, s, 512);
|
||||
set_screenshots_path(s);
|
||||
}
|
||||
|
||||
void paths_loadconfig()
|
||||
{
|
||||
char *cfg_roms_paths = config_get_string(CFG_GLOBAL, "Paths", "roms_paths", 0);
|
||||
char *cfg_nvr_path = config_get_string(CFG_GLOBAL, "Paths", "nvr_path", 0);
|
||||
char *cfg_configs_path = config_get_string(CFG_GLOBAL, "Paths", "configs_path", 0);
|
||||
char *cfg_logs_path = config_get_string(CFG_GLOBAL, "Paths", "logs_path", 0);
|
||||
char *cfg_screenshots_path = config_get_string(CFG_GLOBAL, "Paths", "screenshots_path", 0);
|
||||
|
||||
if (cfg_roms_paths)
|
||||
safe_strncpy(default_roms_paths, cfg_roms_paths, 4096);
|
||||
|
|
@ -149,6 +166,8 @@ void paths_loadconfig()
|
|||
safe_strncpy(default_configs_path, cfg_configs_path, 512);
|
||||
if (cfg_logs_path)
|
||||
safe_strncpy(default_logs_path, cfg_logs_path, 512);
|
||||
if (cfg_screenshots_path)
|
||||
safe_strncpy(default_screenshots_path, cfg_screenshots_path, 512);
|
||||
}
|
||||
|
||||
void paths_saveconfig()
|
||||
|
|
@ -157,6 +176,7 @@ void paths_saveconfig()
|
|||
config_set_string(CFG_GLOBAL, "Paths", "nvr_path", default_nvr_path);
|
||||
config_set_string(CFG_GLOBAL, "Paths", "configs_path", default_configs_path);
|
||||
config_set_string(CFG_GLOBAL, "Paths", "logs_path", default_logs_path);
|
||||
config_set_string(CFG_GLOBAL, "Paths", "screenshots_path", default_screenshots_path);
|
||||
}
|
||||
|
||||
void paths_onconfigloaded()
|
||||
|
|
@ -173,6 +193,9 @@ void paths_onconfigloaded()
|
|||
if (strlen(default_logs_path) > 0)
|
||||
set_logs_path(default_logs_path);
|
||||
|
||||
if (strlen(default_screenshots_path) > 0)
|
||||
set_screenshots_path(default_screenshots_path);
|
||||
|
||||
pclog("path = %s\n", pcem_path);
|
||||
}
|
||||
|
||||
|
|
@ -194,6 +217,8 @@ void paths_init()
|
|||
set_nvr_path(s);
|
||||
append_filename(s, pcem_path, "configs/", 512);
|
||||
set_configs_path(s);
|
||||
append_filename(s, pcem_path, "screenshots/", 512);
|
||||
set_screenshots_path(s);
|
||||
set_logs_path(pcem_path);
|
||||
|
||||
add_config_callback(paths_loadconfig, paths_saveconfig, paths_onconfigloaded);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ extern char pcem_path[512];
|
|||
extern char configs_path[512];
|
||||
extern char nvr_path[512];
|
||||
extern char logs_path[512];
|
||||
extern char screenshots_path[512];
|
||||
|
||||
void get_pcem_path(char *s, int size);
|
||||
char get_path_separator();
|
||||
|
|
@ -16,9 +17,11 @@ void set_default_roms_paths(char *s);
|
|||
void set_default_nvr_path(char *s);
|
||||
void set_default_logs_path(char *s);
|
||||
void set_default_configs_path(char *s);
|
||||
void set_default_screenshots_path(char *s);
|
||||
|
||||
/* set the paths temporarily for this session */
|
||||
void set_roms_paths(char* path);
|
||||
void set_nvr_path(char *s);
|
||||
void set_logs_path(char *s);
|
||||
void set_configs_path(char *s);
|
||||
void set_screenshots_path(char *s);
|
||||
|
|
|
|||
2
src/pc.c
|
|
@ -192,6 +192,8 @@ void onesec()
|
|||
{
|
||||
fps=framecount;
|
||||
framecount=0;
|
||||
video_refresh_rate = video_frames;
|
||||
video_frames = 0;
|
||||
win_title_update=1;
|
||||
}
|
||||
|
||||
|
|
|
|||
3341
src/pc.xrc
|
|
@ -167,6 +167,8 @@ int changeframecount=2;
|
|||
uint8_t rotatevga[8][256];
|
||||
|
||||
int frames = 0;
|
||||
int video_frames = 0;
|
||||
int video_refresh_rate = 0;
|
||||
|
||||
int fullchange;
|
||||
|
||||
|
|
@ -522,6 +524,7 @@ void video_wait_for_buffer()
|
|||
|
||||
void video_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h)
|
||||
{
|
||||
video_frames++;
|
||||
if (h <= 0)
|
||||
return;
|
||||
video_wait_for_blit();
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ extern int xsize,ysize;
|
|||
|
||||
extern float cpuclock;
|
||||
|
||||
extern int emu_fps, frames;
|
||||
extern int emu_fps, frames, video_frames, video_refresh_rate;
|
||||
|
||||
extern int readflash;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,13 @@
|
|||
#include "wx-utils.h"
|
||||
#include "wx-common.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define BITMAP WINDOWS_BITMAP
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#undef BITMAP
|
||||
#endif
|
||||
|
||||
extern "C"
|
||||
{
|
||||
int wx_load_config(void*);
|
||||
|
|
@ -29,6 +36,9 @@ wxDEFINE_EVENT(WX_STOP_EMULATION_EVENT, wxCommandEvent);
|
|||
wxDEFINE_EVENT(WX_EXIT_COMPLETE_EVENT, wxCommandEvent);
|
||||
wxDEFINE_EVENT(WX_SHOW_WINDOW_EVENT, wxCommandEvent);
|
||||
wxDEFINE_EVENT(WX_POPUP_MENU_EVENT, PopupMenuEvent);
|
||||
#ifdef _WIN32
|
||||
wxDEFINE_EVENT(WX_WIN_SEND_MESSAGE_EVENT, WinSendMessageEvent);
|
||||
#endif
|
||||
|
||||
wxBEGIN_EVENT_TABLE(Frame, wxFrame)
|
||||
wxEND_EVENT_TABLE()
|
||||
|
|
@ -80,6 +90,9 @@ Frame::Frame(App* app, const wxString& title, const wxPoint& pos,
|
|||
Bind(WX_EXIT_COMPLETE_EVENT, &Frame::OnExitCompleteEvent, this);
|
||||
Bind(WX_STOP_EMULATION_EVENT, &Frame::OnStopEmulationEvent, this);
|
||||
Bind(WX_CALLBACK_EVENT, &Frame::OnCallbackEvent, this);
|
||||
#ifdef _WIN32
|
||||
Bind(WX_WIN_SEND_MESSAGE_EVENT, &Frame::OnWinSendMessageEvent, this);
|
||||
#endif
|
||||
|
||||
CenterOnScreen();
|
||||
}
|
||||
|
|
@ -103,7 +116,7 @@ void Frame::ShowConfigSelection()
|
|||
void Frame::OnCallbackEvent(CallbackEvent& event)
|
||||
{
|
||||
WX_CALLBACK callback = event.GetCallback();
|
||||
callback();
|
||||
callback(event.GetData());
|
||||
}
|
||||
|
||||
void Frame::OnStopEmulationEvent(wxCommandEvent& event)
|
||||
|
|
@ -227,3 +240,10 @@ wxThread::ExitCode CExitThread::Entry()
|
|||
wxQueueEvent(frame, event);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
void Frame::OnWinSendMessageEvent(WinSendMessageEvent& event)
|
||||
{
|
||||
SendMessage((HWND)event.GetHWND(), event.GetMessage(), event.GetWParam(), event.GetLParam());
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
46
src/wx-app.h
|
|
@ -18,24 +18,64 @@ wxDECLARE_EVENT(WX_EXIT_COMPLETE_EVENT, wxCommandEvent);
|
|||
wxDECLARE_EVENT(WX_SHOW_WINDOW_EVENT, wxCommandEvent);
|
||||
wxDECLARE_EVENT(WX_POPUP_MENU_EVENT, PopupMenuEvent);
|
||||
|
||||
#ifdef _WIN32
|
||||
class WinSendMessageEvent;
|
||||
wxDECLARE_EVENT(WX_WIN_SEND_MESSAGE_EVENT, WinSendMessageEvent);
|
||||
class WinSendMessageEvent: public wxCommandEvent
|
||||
{
|
||||
public:
|
||||
WinSendMessageEvent(void* hwnd, int message, INT_PARAM wParam, LONG_PARAM lParam) : wxCommandEvent(WX_WIN_SEND_MESSAGE_EVENT)
|
||||
{
|
||||
this->hwnd = hwnd;
|
||||
this->message = message;
|
||||
this->wParam = wParam;
|
||||
this->lParam = lParam;
|
||||
}
|
||||
WinSendMessageEvent(const WinSendMessageEvent& event) : wxCommandEvent(event)
|
||||
{
|
||||
this->hwnd = event.GetHWND();
|
||||
this->message = event.GetMessage();
|
||||
this->wParam = event.GetWParam();
|
||||
this->lParam = event.GetLParam();
|
||||
}
|
||||
|
||||
wxEvent* Clone() const { return new WinSendMessageEvent(*this); }
|
||||
|
||||
void* GetHWND() const { return hwnd; }
|
||||
int GetMessage() const { return message; }
|
||||
INT_PARAM GetWParam() const { return wParam; }
|
||||
LONG_PARAM GetLParam() const { return lParam; }
|
||||
|
||||
private:
|
||||
void* hwnd;
|
||||
int message;
|
||||
INT_PARAM wParam;
|
||||
LONG_PARAM lParam;
|
||||
};
|
||||
#endif
|
||||
|
||||
class CallbackEvent: public wxCommandEvent
|
||||
{
|
||||
public:
|
||||
CallbackEvent(WX_CALLBACK callback) : wxCommandEvent(WX_CALLBACK_EVENT)
|
||||
CallbackEvent(WX_CALLBACK callback, void* data) : wxCommandEvent(WX_CALLBACK_EVENT)
|
||||
{
|
||||
this->callback = callback;
|
||||
this->data = data;
|
||||
}
|
||||
CallbackEvent(const CallbackEvent& event) : wxCommandEvent(event)
|
||||
{
|
||||
this->callback = event.GetCallback();
|
||||
this->data = event.GetData();
|
||||
}
|
||||
|
||||
wxEvent* Clone() const { return new CallbackEvent(*this); }
|
||||
|
||||
WX_CALLBACK GetCallback() const { return callback; }
|
||||
void* GetData() const { return data; }
|
||||
|
||||
private:
|
||||
WX_CALLBACK callback;
|
||||
void* data;
|
||||
|
||||
|
||||
};
|
||||
|
|
@ -72,7 +112,6 @@ private:
|
|||
wxWindow* window;
|
||||
};
|
||||
|
||||
|
||||
class Frame;
|
||||
|
||||
class App: public wxApp
|
||||
|
|
@ -120,6 +159,9 @@ private:
|
|||
void OnPopupMenuEvent(PopupMenuEvent& event);
|
||||
void OnCallbackEvent(CallbackEvent& event);
|
||||
void OnClose(wxCloseEvent& event);
|
||||
#ifdef _WIN32
|
||||
void OnWinSendMessageEvent(WinSendMessageEvent& event);
|
||||
#endif
|
||||
|
||||
void ShowConfigSelection();
|
||||
wxMenu* menu;
|
||||
|
|
|
|||
1456
src/wx-config.c
|
|
@ -1,16 +1,35 @@
|
|||
#include "ibm.h"
|
||||
#include "config.h"
|
||||
#include "wx-utils.h"
|
||||
#include "wx-sdl2.h"
|
||||
#include "paths.h"
|
||||
|
||||
extern void config_open(void* hwnd);
|
||||
extern void hdconf_open(void* hwnd);
|
||||
extern int config_open(void* hwnd);
|
||||
|
||||
static void select_config(void* hdlg, char* name)
|
||||
{
|
||||
char s[512];
|
||||
int num, c, p;
|
||||
void* h;
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_LIST"));
|
||||
num = wx_sendmessage(h, WX_LB_GETCOUNT, 0, 0);
|
||||
|
||||
for (c = 0; c < num; c++)
|
||||
{
|
||||
wx_sendmessage(h, WX_LB_GETTEXT, c, (LONG_PARAM)s);
|
||||
if (!strcmp(s, name))
|
||||
{
|
||||
wx_sendmessage(h, WX_LB_SETCURSEL, c, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void config_list_update(void* hdlg)
|
||||
{
|
||||
char s[512];
|
||||
int num, c;
|
||||
int num, c, p;
|
||||
void* h;
|
||||
|
||||
strcpy(s, configs_path);
|
||||
|
|
@ -18,9 +37,11 @@ static void config_list_update(void* hdlg)
|
|||
strcat(s, "*.cfg");
|
||||
pclog("Dir %s\n", s);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_LIST"));
|
||||
p = wx_sendmessage(h, WX_LB_GETCURSEL, 0, 0);
|
||||
|
||||
wx_dlgdirlist(hdlg, s, WX_ID("IDC_LIST"), 0, 0);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_LIST"));
|
||||
num = wx_sendmessage(h, WX_LB_GETCOUNT, 0, 0);
|
||||
|
||||
for (c = 0; c < num; c++)
|
||||
|
|
@ -38,11 +59,52 @@ static void config_list_update(void* hdlg)
|
|||
wx_sendmessage(h, WX_LB_DELETESTRING, c, 0);
|
||||
wx_sendmessage(h, WX_LB_INSERTSTRING, c, (LONG_PARAM)s);
|
||||
}
|
||||
|
||||
if (num > 0)
|
||||
{
|
||||
if (p >= num)
|
||||
p = num-1;
|
||||
else if (p < 0)
|
||||
p = 0;
|
||||
wx_sendmessage(h, WX_LB_SETCURSEL, p, 0);
|
||||
}
|
||||
wx_enablewindow(wx_getdlgitem(hdlg, WX_ID("IDC_RENAME")), num);
|
||||
wx_enablewindow(wx_getdlgitem(hdlg, WX_ID("IDC_DELETE")), num);
|
||||
wx_enablewindow(wx_getdlgitem(hdlg, WX_ID("IDC_CONFIG")), num);
|
||||
wx_enablewindow(wx_getdlgitem(hdlg, wxID_OK), num);
|
||||
}
|
||||
|
||||
static int run(void* hdlg)
|
||||
{
|
||||
char s[512];
|
||||
|
||||
int ret = wx_dlgdirselectex(hdlg, (LONG_PARAM)s, 512, WX_ID("IDC_LIST"));
|
||||
|
||||
pclog("wx_dlgdirselectex returned %i %s\n", ret, s);
|
||||
if (s[0])
|
||||
{
|
||||
char cfg[512];
|
||||
|
||||
strcpy(cfg, configs_path);
|
||||
put_backslash(cfg);
|
||||
strcat(cfg, s);
|
||||
strcat(cfg, "cfg");
|
||||
// sprintf(cfg, "%s\\configs\\%scfg", config_path, s);
|
||||
pclog("Config name %s\n", cfg);
|
||||
|
||||
strcpy(config_file_default, cfg);
|
||||
|
||||
wx_enddialog(hdlg, 1);
|
||||
// pause = 0;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int config_selection_dlgproc(void* hdlg, int message, INT_PARAM wParam, LONG_PARAM lParam)
|
||||
{
|
||||
//void* h;
|
||||
int done = 0;
|
||||
|
||||
switch (message)
|
||||
{
|
||||
|
|
@ -58,31 +120,7 @@ static int config_selection_dlgproc(void* hdlg, int message, INT_PARAM wParam, L
|
|||
case WX_COMMAND:
|
||||
{
|
||||
if (wParam == wxID_OK)
|
||||
{
|
||||
char s[512];
|
||||
|
||||
int ret = wx_dlgdirselectex(hdlg, (LONG_PARAM)s, 512, WX_ID("IDC_LIST"));
|
||||
|
||||
pclog("wx_dlgdirselectex returned %i %s\n", ret, s);
|
||||
if (s[0])
|
||||
{
|
||||
char cfg[512];
|
||||
|
||||
strcpy(cfg, configs_path);
|
||||
put_backslash(cfg);
|
||||
strcat(cfg, s);
|
||||
strcat(cfg, "cfg");
|
||||
// sprintf(cfg, "%s\\configs\\%scfg", config_path, s);
|
||||
pclog("Config name %s\n", cfg);
|
||||
|
||||
strcpy(config_file_default, cfg);
|
||||
|
||||
wx_enddialog(hdlg, 1);
|
||||
// pause = 0;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
return run(hdlg);
|
||||
else if (wParam == wxID_CANCEL)
|
||||
{
|
||||
wx_enddialog(hdlg, 0);
|
||||
|
|
@ -92,22 +130,37 @@ static int config_selection_dlgproc(void* hdlg, int message, INT_PARAM wParam, L
|
|||
else if (wParam == WX_ID("IDC_NEW"))
|
||||
{
|
||||
char name[64];
|
||||
name[0] = 0;
|
||||
|
||||
// if (!getsfile(hdlg, "Configuration (*.cfg)|*.cfg|All files (*.*)|*.*", "", s, "cfg"))
|
||||
if (wx_textentrydialog(hdlg, "Enter name:", "New config", 0, 1, 64, (LONG_PARAM)name))
|
||||
while (!done)
|
||||
{
|
||||
strcpy(openfilestring, configs_path);
|
||||
put_backslash(openfilestring);
|
||||
strcat(openfilestring, name);
|
||||
strcat(openfilestring, ".cfg");
|
||||
if (wx_textentrydialog(hdlg, "Enter name:", "New config", name, 1, 64, (LONG_PARAM)name))
|
||||
{
|
||||
char cfg[512];
|
||||
|
||||
pclog("Config %s\n", openfilestring);
|
||||
strcpy(cfg, configs_path);
|
||||
put_backslash(cfg);
|
||||
strcat(cfg, name);
|
||||
strcat(cfg, ".cfg");
|
||||
|
||||
config_open(hdlg);
|
||||
pclog("Config %s\n", cfg);
|
||||
|
||||
saveconfig(openfilestring);
|
||||
if (!wx_file_exists(cfg))
|
||||
{
|
||||
if (config_open(hdlg))
|
||||
{
|
||||
saveconfig(cfg);
|
||||
|
||||
config_list_update(hdlg);
|
||||
config_list_update(hdlg);
|
||||
select_config(hdlg, name);
|
||||
}
|
||||
done = 1;
|
||||
}
|
||||
else
|
||||
wx_simple_messagebox("Already exists", "A configuration with that name already exists.");
|
||||
}
|
||||
else
|
||||
done = 1;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
@ -136,30 +189,6 @@ static int config_selection_dlgproc(void* hdlg, int message, INT_PARAM wParam, L
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
else if (wParam == WX_ID("IDC_HDCONF"))
|
||||
{
|
||||
char s[512];
|
||||
|
||||
int ret = wx_dlgdirselectex(hdlg, (LONG_PARAM)s, 512, WX_ID("IDC_LIST"));
|
||||
|
||||
pclog("wx_dlgdirselectex returned %i %s\n", ret, s);
|
||||
if (s[0])
|
||||
{
|
||||
char cfg[512];
|
||||
|
||||
strcpy(cfg, configs_path);
|
||||
put_backslash(cfg);
|
||||
strcat(cfg, s);
|
||||
strcat(cfg, "cfg");
|
||||
pclog("Config name %s\n", cfg);
|
||||
|
||||
loadconfig(cfg);
|
||||
hdconf_open(hdlg);
|
||||
saveconfig(cfg);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else if (wParam == WX_ID("IDC_RENAME"))
|
||||
{
|
||||
char name[64];
|
||||
|
|
@ -172,27 +201,39 @@ static int config_selection_dlgproc(void* hdlg, int message, INT_PARAM wParam, L
|
|||
if (c >= 0)
|
||||
{
|
||||
wx_sendmessage(h, WX_LB_GETTEXT, c, (LONG_PARAM)old_name);
|
||||
strcpy(name, old_name);
|
||||
|
||||
if (wx_textentrydialog(hdlg, "Enter name:", "New name", old_name, 1, 64, (LONG_PARAM)name))
|
||||
while (!done)
|
||||
{
|
||||
char old_path[512];
|
||||
char new_path[512];
|
||||
if (wx_textentrydialog(hdlg, "Enter name:", "New name", name, 1, 64, (LONG_PARAM)name))
|
||||
{
|
||||
char old_path[512];
|
||||
char new_path[512];
|
||||
|
||||
strcpy(old_path, configs_path);
|
||||
put_backslash(old_path);
|
||||
strcat(old_path, old_name);
|
||||
strcat(old_path, ".cfg");
|
||||
strcpy(old_path, configs_path);
|
||||
put_backslash(old_path);
|
||||
strcat(old_path, old_name);
|
||||
strcat(old_path, ".cfg");
|
||||
|
||||
strcpy(new_path, configs_path);
|
||||
put_backslash(new_path);
|
||||
strcat(new_path, name);
|
||||
strcat(new_path, ".cfg");
|
||||
strcpy(new_path, configs_path);
|
||||
put_backslash(new_path);
|
||||
strcat(new_path, name);
|
||||
strcat(new_path, ".cfg");
|
||||
|
||||
pclog("Rename %s to %s\n", old_path, new_path);
|
||||
pclog("Rename %s to %s\n", old_path, new_path);
|
||||
|
||||
rename(old_path, new_path);
|
||||
if (!wx_file_exists(new_path))
|
||||
{
|
||||
rename(old_path, new_path);
|
||||
|
||||
config_list_update(hdlg);
|
||||
config_list_update(hdlg);
|
||||
done = 1;
|
||||
}
|
||||
else
|
||||
wx_simple_messagebox("Already exists", "A configuration with that name already exists.");
|
||||
}
|
||||
else
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -223,6 +264,11 @@ static int config_selection_dlgproc(void* hdlg, int message, INT_PARAM wParam, L
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (wParam == WX_ID("IDC_LIST"))
|
||||
{
|
||||
if (lParam == WX_LBN_DBLCLK)
|
||||
run(hdlg);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,36 +13,41 @@
|
|||
|
||||
extern "C"
|
||||
{
|
||||
#include "config.h"
|
||||
void saveconfig(char*);
|
||||
void resetpchard();
|
||||
int deviceconfig_dlgproc(void* hdlg, int message, INT_PARAM wParam, LONG_PARAM lParam);
|
||||
device_t *config_device;
|
||||
int confirm();
|
||||
#include "config.h"
|
||||
#include "plat-midi.h"
|
||||
void saveconfig(char*);
|
||||
void resetpchard();
|
||||
int deviceconfig_dlgproc(void* hdlg, int message, INT_PARAM wParam,
|
||||
LONG_PARAM lParam);
|
||||
device_t *config_device;
|
||||
int confirm();
|
||||
}
|
||||
#define IDC_CONFIG_BASE 1000
|
||||
|
||||
|
||||
int deviceconfig_dlgproc(void* hdlg, int message, INT_PARAM wParam, LONG_PARAM lParam) {
|
||||
switch (message) {
|
||||
case WX_INITDIALOG: {
|
||||
int deviceconfig_dlgproc(void* hdlg, int message, INT_PARAM wParam,
|
||||
LONG_PARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WX_INITDIALOG:
|
||||
{
|
||||
int id = IDC_CONFIG_BASE;
|
||||
device_config_t *config = config_device->config;
|
||||
int c;
|
||||
|
||||
while (config->type != -1) {
|
||||
while (config->type != -1)
|
||||
{
|
||||
device_config_selection_t *selection = config->selection;
|
||||
void* h = 0;
|
||||
int val_int;
|
||||
char *val_string;
|
||||
int num;
|
||||
char s[80];
|
||||
char s[100];
|
||||
|
||||
switch (config->type) {
|
||||
switch (config->type)
|
||||
{
|
||||
case CONFIG_BINARY:
|
||||
h = wx_getdlgitem(hdlg, id);
|
||||
val_int = config_get_int(CFG_MACHINE, config_device->name, config->name,
|
||||
config->default_int);
|
||||
val_int = config_get_int(CFG_MACHINE, config_device->name, config->name, config->default_int);
|
||||
|
||||
wx_sendmessage(h, WX_BM_SETCHECK, val_int, 0);
|
||||
|
||||
|
|
@ -50,14 +55,13 @@ int deviceconfig_dlgproc(void* hdlg, int message, INT_PARAM wParam, LONG_PARAM l
|
|||
break;
|
||||
|
||||
case CONFIG_SELECTION:
|
||||
h = wx_getdlgitem(hdlg, id+1);
|
||||
val_int = config_get_int(CFG_MACHINE, config_device->name, config->name,
|
||||
config->default_int);
|
||||
h = wx_getdlgitem(hdlg, id + 1);
|
||||
val_int = config_get_int(CFG_MACHINE, config_device->name, config->name, config->default_int);
|
||||
|
||||
c = 0;
|
||||
while (selection->description[0]) {
|
||||
wx_sendmessage(h, WX_CB_ADDSTRING, 0,
|
||||
(LONG_PARAM) selection->description);
|
||||
while (selection->description[0])
|
||||
{
|
||||
wx_sendmessage(h, WX_CB_ADDSTRING, 0, (LONG_PARAM) selection->description);
|
||||
if (val_int == selection->value)
|
||||
wx_sendmessage(h, WX_CB_SETCURSEL, c, 0);
|
||||
selection++;
|
||||
|
|
@ -68,19 +72,21 @@ int deviceconfig_dlgproc(void* hdlg, int message, INT_PARAM wParam, LONG_PARAM l
|
|||
break;
|
||||
|
||||
case CONFIG_MIDI:
|
||||
// midi ignored
|
||||
// val_int = config_get_int(CFG_MACHINE, NULL, config->name, config->default_int);
|
||||
//
|
||||
// num = midi_get_num_devs();
|
||||
// for (c = 0; c < num; c++)
|
||||
// {
|
||||
// midi_get_dev_name(c, s);
|
||||
// SendMessage(h, CB_ADDSTRING, 0, (LONG_PARAM)s);
|
||||
// if (val_int == c)
|
||||
// SendMessage(h, CB_SETCURSEL, c, 0);
|
||||
// }
|
||||
//
|
||||
// id += 2;
|
||||
num = midi_get_num_devs();
|
||||
if (num > 0)
|
||||
{
|
||||
h = wx_getdlgitem(hdlg, id + 1);
|
||||
val_int = config_get_int(CFG_MACHINE, NULL, config->name, config->default_int);
|
||||
|
||||
for (c = 0; c < num; c++)
|
||||
{
|
||||
midi_get_dev_name(c, s);
|
||||
wx_sendmessage(h, WX_CB_ADDSTRING, 0, (LONG_PARAM) s);
|
||||
if (val_int == c)
|
||||
wx_sendmessage(h, WX_CB_SETCURSEL, c, 0);
|
||||
}
|
||||
id += 2;
|
||||
}
|
||||
break;
|
||||
}
|
||||
config++;
|
||||
|
|
@ -89,24 +95,26 @@ int deviceconfig_dlgproc(void* hdlg, int message, INT_PARAM wParam, LONG_PARAM l
|
|||
return TRUE;
|
||||
|
||||
case WX_COMMAND:
|
||||
switch (wParam) {
|
||||
case wxID_OK: {
|
||||
switch (wParam)
|
||||
{
|
||||
case wxID_OK:
|
||||
{
|
||||
int id = IDC_CONFIG_BASE;
|
||||
device_config_t *config = config_device->config;
|
||||
int c;
|
||||
int changed = 0;
|
||||
|
||||
while (config->type != -1) {
|
||||
while (config->type != -1)
|
||||
{
|
||||
device_config_selection_t *selection = config->selection;
|
||||
void* h = 0;
|
||||
int val_int;
|
||||
char *val_string;
|
||||
|
||||
switch (config->type) {
|
||||
switch (config->type)
|
||||
{
|
||||
case CONFIG_BINARY:
|
||||
h = wx_getdlgitem(hdlg, id);
|
||||
val_int = config_get_int(CFG_MACHINE, config_device->name, config->name,
|
||||
config->default_int);
|
||||
val_int = config_get_int(CFG_MACHINE, config_device->name, config->name, config->default_int);
|
||||
|
||||
if (val_int != wx_sendmessage(h, WX_BM_GETCHECK, 0, 0))
|
||||
changed = 1;
|
||||
|
|
@ -115,9 +123,8 @@ int deviceconfig_dlgproc(void* hdlg, int message, INT_PARAM wParam, LONG_PARAM l
|
|||
break;
|
||||
|
||||
case CONFIG_SELECTION:
|
||||
h = wx_getdlgitem(hdlg, id+1);
|
||||
val_int = config_get_int(CFG_MACHINE, config_device->name, config->name,
|
||||
config->default_int);
|
||||
h = wx_getdlgitem(hdlg, id + 1);
|
||||
val_int = config_get_int(CFG_MACHINE, config_device->name, config->name, config->default_int);
|
||||
|
||||
c = wx_sendmessage(h, WX_CB_GETCURSEL, 0, 0);
|
||||
|
||||
|
|
@ -131,27 +138,30 @@ int deviceconfig_dlgproc(void* hdlg, int message, INT_PARAM wParam, LONG_PARAM l
|
|||
break;
|
||||
|
||||
case CONFIG_MIDI:
|
||||
// midi ignored
|
||||
// val_int = config_get_int(CFG_MACHINE, NULL, config->name,
|
||||
// config->default_int);
|
||||
//
|
||||
// c = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
//
|
||||
// if (val_int != c)
|
||||
// changed = 1;
|
||||
//
|
||||
// id += 2;
|
||||
if (midi_get_num_devs() > 0)
|
||||
{
|
||||
h = wx_getdlgitem(hdlg, id + 1);
|
||||
val_int = config_get_int(CFG_MACHINE, NULL, config->name, config->default_int);
|
||||
|
||||
c = wx_sendmessage(h, WX_CB_GETCURSEL, 0, 0);
|
||||
|
||||
if (val_int != c)
|
||||
changed = 1;
|
||||
id += 2;
|
||||
}
|
||||
break;
|
||||
}
|
||||
config++;
|
||||
}
|
||||
|
||||
if (!changed) {
|
||||
if (!changed)
|
||||
{
|
||||
wx_enddialog(hdlg, 0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (has_been_inited && !confirm()) {
|
||||
if (has_been_inited && !confirm())
|
||||
{
|
||||
wx_enddialog(hdlg, 0);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -159,38 +169,40 @@ int deviceconfig_dlgproc(void* hdlg, int message, INT_PARAM wParam, LONG_PARAM l
|
|||
id = IDC_CONFIG_BASE;
|
||||
config = config_device->config;
|
||||
|
||||
while (config->type != -1) {
|
||||
while (config->type != -1)
|
||||
{
|
||||
device_config_selection_t *selection = config->selection;
|
||||
void* h = 0;
|
||||
int val_int;
|
||||
char *val_string;
|
||||
|
||||
switch (config->type) {
|
||||
switch (config->type)
|
||||
{
|
||||
case CONFIG_BINARY:
|
||||
h = wx_getdlgitem(hdlg, id);
|
||||
config_set_int(CFG_MACHINE, config_device->name, config->name,
|
||||
wx_sendmessage(h, WX_BM_GETCHECK, 0, 0));
|
||||
config_set_int(CFG_MACHINE, config_device->name, config->name, wx_sendmessage(h, WX_BM_GETCHECK, 0, 0));
|
||||
|
||||
id++;
|
||||
break;
|
||||
|
||||
case CONFIG_SELECTION:
|
||||
h = wx_getdlgitem(hdlg, id+1);
|
||||
h = wx_getdlgitem(hdlg, id + 1);
|
||||
c = wx_sendmessage(h, WX_CB_GETCURSEL, 0, 0);
|
||||
for (; c > 0; c--)
|
||||
selection++;
|
||||
config_set_int(CFG_MACHINE, config_device->name, config->name,
|
||||
selection->value);
|
||||
config_set_int(CFG_MACHINE, config_device->name, config->name, selection->value);
|
||||
|
||||
id += 2;
|
||||
break;
|
||||
|
||||
case CONFIG_MIDI:
|
||||
// midi ignored
|
||||
// c = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
// config_set_int(CFG_MACHINE, NULL, config->name, c);
|
||||
//
|
||||
// id += 2;
|
||||
if (midi_get_num_devs() > 0)
|
||||
{
|
||||
h = wx_getdlgitem(hdlg, id + 1);
|
||||
c = wx_sendmessage(h, WX_CB_GETCURSEL, 0, 0);
|
||||
config_set_int(CFG_MACHINE, NULL, config->name, c);
|
||||
|
||||
id += 2;
|
||||
}
|
||||
break;
|
||||
}
|
||||
config++;
|
||||
|
|
@ -214,55 +226,68 @@ int deviceconfig_dlgproc(void* hdlg, int message, INT_PARAM wParam, LONG_PARAM l
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
void deviceconfig_open(void* hwnd, device_t *device)
|
||||
{
|
||||
char s[257];
|
||||
config_device = device;
|
||||
|
||||
|
||||
void deviceconfig_open(void* hwnd, device_t *device) {
|
||||
config_device = device;
|
||||
|
||||
PCemDialogBox dialog((wxWindow*) hwnd, deviceconfig_dlgproc);
|
||||
PCemDialogBox dialog((wxWindow*) hwnd, deviceconfig_dlgproc);
|
||||
// dialog.SetWindowStyle(wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
|
||||
|
||||
device_config_t *config = device->config;
|
||||
device_config_t *config = device->config;
|
||||
|
||||
dialog.SetTitle("Device Configuration");
|
||||
dialog.SetTitle("Device Configuration");
|
||||
|
||||
wxBoxSizer* root = new wxBoxSizer(wxVERTICAL);
|
||||
wxFlexGridSizer* root = new wxFlexGridSizer(0, 1, 0, 0);
|
||||
root->SetFlexibleDirection(wxBOTH);
|
||||
root->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
|
||||
dialog.SetSizer(root);
|
||||
|
||||
wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
|
||||
root->Add(sizer, 0, wxALL, 5);
|
||||
wxFlexGridSizer* sizer = new wxFlexGridSizer(0, 2, 0, 0);
|
||||
sizer->SetFlexibleDirection(wxBOTH);
|
||||
sizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
|
||||
sizer->AddGrowableCol(1);
|
||||
root->Add(sizer, 1, wxEXPAND, 5);
|
||||
|
||||
int id = IDC_CONFIG_BASE;
|
||||
int id = IDC_CONFIG_BASE;
|
||||
|
||||
while (config->type != -1) {
|
||||
switch (config->type) {
|
||||
case CONFIG_BINARY:
|
||||
sizer->Add(new wxCheckBox(&dialog, id++, config->description), 0, wxALL);
|
||||
break;
|
||||
while (config->type != -1)
|
||||
{
|
||||
switch (config->type)
|
||||
{
|
||||
case CONFIG_BINARY:
|
||||
sizer->Add(0, 0, 1, wxEXPAND, 5);
|
||||
sizer->Add(new wxCheckBox(&dialog, id++, config->description), 0, wxALL, 5);
|
||||
break;
|
||||
|
||||
case CONFIG_SELECTION: {
|
||||
sizer->Add(new wxStaticText(&dialog, id++, config->description), 0, wxALL);
|
||||
wxComboBox* cb = new wxComboBox(&dialog, id++);
|
||||
cb->SetEditable(false);
|
||||
sizer->Add(cb, 0, wxALL);
|
||||
} break;
|
||||
case CONFIG_MIDI:
|
||||
// midi ignored
|
||||
break;
|
||||
}
|
||||
case CONFIG_SELECTION:
|
||||
case CONFIG_MIDI:
|
||||
{
|
||||
if (config->type == CONFIG_MIDI && midi_get_num_devs() == 0)
|
||||
break;
|
||||
sprintf(s, "%s:", config->description);
|
||||
sizer->Add(new wxStaticText(&dialog, id++, s), 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);
|
||||
wxBoxSizer* comboSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
sizer->Add(comboSizer, 1, wxEXPAND, 5);
|
||||
wxComboBox* cb = new wxComboBox(&dialog, id++);
|
||||
cb->SetEditable(false);
|
||||
comboSizer->Add(cb, 1, wxALL, 5);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
config++;
|
||||
}
|
||||
config++;
|
||||
}
|
||||
|
||||
wxBoxSizer* okCancelSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
wxBoxSizer* okCancelSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
root->Add(okCancelSizer, 1, wxEXPAND, 5);
|
||||
|
||||
okCancelSizer->Add(new wxButton(&dialog, wxID_OK));
|
||||
okCancelSizer->Add(new wxButton(&dialog, wxID_CANCEL));
|
||||
okCancelSizer->Add(0, 0, 1, wxEXPAND, 5);
|
||||
okCancelSizer->Add(new wxButton(&dialog, wxID_OK), 0, wxALL, 5);
|
||||
okCancelSizer->Add(new wxButton(&dialog, wxID_CANCEL), 0, wxALL, 5);
|
||||
|
||||
sizer->Add(okCancelSizer);
|
||||
|
||||
dialog.Fit();
|
||||
dialog.OnInit();
|
||||
dialog.ShowModal();
|
||||
dialog.Destroy();
|
||||
dialog.Fit();
|
||||
dialog.OnInit();
|
||||
dialog.ShowModal();
|
||||
dialog.Destroy();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#include "wx-dialogbox.h"
|
||||
|
||||
#include <wx/wxprec.h>
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
|
|
@ -7,19 +5,34 @@
|
|||
#endif
|
||||
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/notebook.h>
|
||||
|
||||
#include "wx-dialogbox.h"
|
||||
#include "wx-utils.h"
|
||||
|
||||
BEGIN_EVENT_TABLE(PCemDialogBox, wxDialog) END_EVENT_TABLE()
|
||||
|
||||
class CommandValue: public wxObject
|
||||
{
|
||||
public:
|
||||
CommandValue(int value) { this->value = value; }
|
||||
int GetValue() { return this->value; }
|
||||
private:
|
||||
int value;
|
||||
};
|
||||
|
||||
PCemDialogBox::PCemDialogBox(wxWindow* parent, int (*callback)(void* window, int message, INT_PARAM param1, LONG_PARAM param2)) :
|
||||
wxDialog(parent, -1, "No title")
|
||||
{
|
||||
this->callback = callback;
|
||||
this->commandActive = false;
|
||||
}
|
||||
|
||||
PCemDialogBox::PCemDialogBox(wxWindow* parent, const char* name, int (*callback)(void* window, int message, INT_PARAM param1, LONG_PARAM param2))
|
||||
{
|
||||
wxXmlResource::Get()->LoadDialog(this, parent, name);
|
||||
this->callback = callback;
|
||||
this->commandActive = false;
|
||||
}
|
||||
|
||||
void PCemDialogBox::OnInit()
|
||||
|
|
@ -28,8 +41,11 @@ void PCemDialogBox::OnInit()
|
|||
{
|
||||
callback(this, WX_INITDIALOG, 0, 0);
|
||||
Bind(wxEVT_BUTTON, &PCemDialogBox::OnCommand, this);
|
||||
Bind(wxEVT_RADIOBUTTON, &PCemDialogBox::OnCommand, this);
|
||||
Bind(wxEVT_TEXT, &PCemDialogBox::OnCommand, this);
|
||||
Bind(wxEVT_COMBOBOX, &PCemDialogBox::OnCommand, this);
|
||||
Bind(wxEVT_NOTEBOOK_PAGE_CHANGED, &PCemDialogBox::OnNotebookChanged, this);
|
||||
Bind(wxEVT_LISTBOX_DCLICK, &PCemDialogBox::OnCommand, this, wxID_ANY, wxID_ANY, new CommandValue(WX_LBN_DBLCLK));
|
||||
}
|
||||
|
||||
wxWindow* root = FindWindow(XRCID("ROOT_PANEL"));
|
||||
|
|
@ -38,8 +54,31 @@ void PCemDialogBox::OnInit()
|
|||
Fit();
|
||||
}
|
||||
|
||||
void PCemDialogBox::OnCommand(wxCommandEvent& event)
|
||||
int PCemDialogBox::processEvent(int message, INT_PARAM param1, LONG_PARAM param2)
|
||||
{
|
||||
callback(this, WX_COMMAND, event.GetId(), 0);
|
||||
int result = 0;
|
||||
/* lock the current command to prevent strange behavior */
|
||||
if (!commandActive)
|
||||
{
|
||||
commandActive = true;
|
||||
result = callback(this, message, param1, param2);
|
||||
commandActive = false;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void PCemDialogBox::OnNotebookChanged(wxCommandEvent& event)
|
||||
{
|
||||
wxBookCtrlEvent* ev = (wxBookCtrlEvent*)&event;
|
||||
processEvent(WX_COMMAND, ev->GetId(), ev->GetSelection());
|
||||
}
|
||||
|
||||
void PCemDialogBox::OnCommand(wxCommandEvent& event)
|
||||
{
|
||||
LONG_PARAM val = 0;
|
||||
CommandValue* c = (CommandValue*)event.GetEventUserData();
|
||||
if (c)
|
||||
val = c->GetValue();
|
||||
processEvent(WX_COMMAND, event.GetId(), val);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,11 @@ public:
|
|||
virtual ~PCemDialogBox() {}
|
||||
void OnInit();
|
||||
private:
|
||||
void OnCommand(wxCommandEvent &event);
|
||||
void OnNotebookChanged(wxCommandEvent& event);
|
||||
void OnCommand(wxCommandEvent& event);
|
||||
int processEvent(int message, INT_PARAM param1, LONG_PARAM param2);
|
||||
int(*callback)(void* window, int message, INT_PARAM param1, LONG_PARAM param2);
|
||||
bool commandActive;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ extern int video_fullscreen_mode;
|
|||
extern int win_doresize;
|
||||
|
||||
extern int window_doreset;
|
||||
extern int window_dosetresize;
|
||||
extern int renderer_doreset;
|
||||
extern int window_dofullscreen;
|
||||
extern int window_dowindowed;
|
||||
|
|
|
|||
155
src/wx-glsl.h
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
#ifndef SRC_WX_GLSL_H_
|
||||
#define SRC_WX_GLSL_H_
|
||||
|
||||
#define MAX_PREV 7
|
||||
|
||||
#define MAX_SHADERS 20
|
||||
#define MAX_TEXTURES 20
|
||||
#define MAX_PARAMETERS 100
|
||||
|
||||
#define MAX_USER_SHADERS 20
|
||||
//#define SDL2_SHADER_DEBUG
|
||||
|
||||
struct shader_scale {
|
||||
int mode[2];
|
||||
float value[2];
|
||||
};
|
||||
|
||||
struct shader_state {
|
||||
float input_size[2];
|
||||
float input_texture_size[2];
|
||||
float output_texture_size[2];
|
||||
float output_size[2];
|
||||
float tex_coords[8];
|
||||
};
|
||||
|
||||
struct shader_vbo {
|
||||
int vertex_coord;
|
||||
int tex_coord;
|
||||
int color;
|
||||
};
|
||||
|
||||
struct shader_texture {
|
||||
int id;
|
||||
int width;
|
||||
int height;
|
||||
int type;
|
||||
int internal_format;
|
||||
int format;
|
||||
int min_filter;
|
||||
int mag_filter;
|
||||
int wrap_mode;
|
||||
void* data;
|
||||
int mipmap;
|
||||
};
|
||||
|
||||
struct shader_lut_texture {
|
||||
char name[50];
|
||||
struct shader_texture texture;
|
||||
};
|
||||
|
||||
struct shader_fbo {
|
||||
int id;
|
||||
struct shader_texture texture;
|
||||
int srgb;
|
||||
};
|
||||
|
||||
struct shader_prev {
|
||||
struct shader_fbo fbo;
|
||||
struct shader_vbo vbo;
|
||||
};
|
||||
|
||||
struct shader_input {
|
||||
int texture;
|
||||
int input_size;
|
||||
int texture_size;
|
||||
int tex_coord;
|
||||
};
|
||||
|
||||
struct shader_uniforms {
|
||||
int mvp_matrix;
|
||||
int vertex_coord;
|
||||
int tex_coord;
|
||||
int color;
|
||||
|
||||
int texture;
|
||||
int input_size;
|
||||
int texture_size;
|
||||
int output_size;
|
||||
|
||||
int frame_count;
|
||||
int frame_direction;
|
||||
|
||||
struct shader_input orig;
|
||||
struct shader_input pass[MAX_SHADERS];
|
||||
struct shader_input prev_pass[MAX_SHADERS];
|
||||
struct shader_input prev[MAX_PREV];
|
||||
|
||||
int parameters[MAX_PARAMETERS];
|
||||
int lut_textures[MAX_TEXTURES];
|
||||
};
|
||||
|
||||
struct shader_program {
|
||||
int vertex_shader;
|
||||
int fragment_shader;
|
||||
int id;
|
||||
};
|
||||
|
||||
struct shader_parameter {
|
||||
char id[64];
|
||||
char description[64];
|
||||
float default_value;
|
||||
float value;
|
||||
float min;
|
||||
float max;
|
||||
float step;
|
||||
};
|
||||
|
||||
struct shader_pass {
|
||||
int active;
|
||||
char alias[64];
|
||||
int vertex_array;
|
||||
int frame_count_mod;
|
||||
struct shader_program program;
|
||||
struct shader_uniforms uniforms;
|
||||
struct shader_fbo fbo;
|
||||
struct shader_vbo vbo;
|
||||
struct shader_state state;
|
||||
struct shader_scale scale;
|
||||
};
|
||||
|
||||
struct glsl_shader {
|
||||
int active;
|
||||
char name[64];
|
||||
|
||||
int num_passes;
|
||||
struct shader_pass passes[MAX_SHADERS];
|
||||
|
||||
int num_lut_textures;
|
||||
struct shader_lut_texture lut_textures[MAX_TEXTURES];
|
||||
|
||||
int num_parameters;
|
||||
struct shader_parameter parameters[MAX_PARAMETERS];
|
||||
|
||||
struct shader_pass prev_scene;
|
||||
struct shader_prev prev[MAX_PREV+1];
|
||||
|
||||
int last_prev_update;
|
||||
int has_prev;
|
||||
|
||||
float shader_refresh_rate;
|
||||
};
|
||||
|
||||
typedef struct glsl_t {
|
||||
int num_shaders;
|
||||
struct glsl_shader shaders[MAX_USER_SHADERS];
|
||||
struct shader_pass scene;
|
||||
struct shader_pass final_pass;
|
||||
struct shader_pass fs_color;
|
||||
#ifdef SDL2_SHADER_DEBUG
|
||||
struct shader_pass debug;
|
||||
#endif
|
||||
int srgb;
|
||||
} glsl_t;
|
||||
|
||||
#endif
|
||||
328
src/wx-glslp-parser.c
Normal file
|
|
@ -0,0 +1,328 @@
|
|||
#include "wx-glslp-parser.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include "wx-utils.h"
|
||||
|
||||
#define safe_strncpy(a,b,n) do { strncpy((a),(b),(n)-1); (a)[(n)-1] = 0; } while (0)
|
||||
|
||||
extern char* get_filename(char*);
|
||||
extern void pclog(const char *format, ...);
|
||||
|
||||
static int endswith(const char* str, const char* ext)
|
||||
{
|
||||
int i;
|
||||
const char* p;
|
||||
int elen = strlen(ext);
|
||||
int slen = strlen(str);
|
||||
if (slen >= elen)
|
||||
{
|
||||
p = &str[slen-elen];
|
||||
for (i = 0; i < elen; ++i)
|
||||
{
|
||||
if (tolower(p[i]) != tolower(ext[i]))
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char* load_file(const char* fn)
|
||||
{
|
||||
FILE* f = fopen(fn, "rb");
|
||||
if (!f)
|
||||
return 0;
|
||||
fseek(f, 0, SEEK_END);
|
||||
long fsize = ftell(f);
|
||||
fseek(f, 0, SEEK_SET);
|
||||
|
||||
char* data = malloc(fsize+1);
|
||||
|
||||
long read = fread(data, fsize, 1, f);
|
||||
fclose(f);
|
||||
|
||||
data[fsize] = 0;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
static void strip_lines(const char* program, const char* starts_with)
|
||||
{
|
||||
/* strip parameters */
|
||||
char* ptr = strstr(program, starts_with);
|
||||
while (ptr)
|
||||
{
|
||||
while (*ptr != '\n' && *ptr != '\0')
|
||||
*ptr++ = ' ';
|
||||
ptr = strstr(program, starts_with);
|
||||
}
|
||||
}
|
||||
|
||||
static void strip_parameters(const char* program)
|
||||
{
|
||||
/* strip parameters */
|
||||
strip_lines(program, "#pragma parameter");
|
||||
}
|
||||
|
||||
static void strip_defines(const char* program)
|
||||
{
|
||||
/* strip texture define */
|
||||
strip_lines(program, "#define texture");
|
||||
}
|
||||
|
||||
static int has_parameter(glslp_t* glsl, char* id)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < glsl->num_parameters; ++i)
|
||||
if (!strcmp(glsl->parameters[i].id, id))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_parameters(glslp_t* glsl)
|
||||
{
|
||||
int i;
|
||||
struct parameter p;
|
||||
for (i = 0; i < glsl->num_shaders; ++i)
|
||||
{
|
||||
struct shader* shader = &glsl->shaders[i];
|
||||
FILE* f = fopen(shader->shader_fn, "rb");
|
||||
if (!f)
|
||||
return 0;
|
||||
|
||||
char line[1024];
|
||||
while (fgets(line, sizeof(line)-1, f) && glsl->num_parameters < MAX_PARAMETERS)
|
||||
{
|
||||
int num = sscanf(line, "#pragma parameter %63s \"%63[^\"]\" %f %f %f %f", p.id, p.description, &p.default_value, &p.min, &p.max, &p.step);
|
||||
if (num < 5)
|
||||
continue;
|
||||
p.id[63] = 0;
|
||||
p.description[63] = 0;
|
||||
|
||||
if (num == 5)
|
||||
p.step = 0.1f * (p.max-p.min);
|
||||
|
||||
p.value = p.default_value;
|
||||
|
||||
if (!has_parameter(glsl, p.id))
|
||||
{
|
||||
memcpy(&glsl->parameters[glsl->num_parameters++], &p, sizeof(struct parameter));
|
||||
pclog("Read parameter: %s (%s) %f, %f -> %f (%f)\n", p.id, p.description, p.default_value, p.min, p.max, p.step);
|
||||
}
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static struct parameter* get_parameter(glslp_t* glslp, const char* id)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < glslp->num_parameters; ++i)
|
||||
{
|
||||
if (!strcmp(glslp->parameters[i].id, id)) {
|
||||
return &glslp->parameters[i];
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static glslp_t* glsl_parse(const char* f)
|
||||
{
|
||||
glslp_t* glslp = malloc(sizeof(glslp_t));
|
||||
memset(glslp, 0, sizeof(glslp_t));
|
||||
glslp->num_shaders = 1;
|
||||
struct shader* shader = &glslp->shaders[0];
|
||||
strcpy(shader->shader_fn, f);
|
||||
shader->shader_program = load_file(f);
|
||||
if (!shader->shader_program)
|
||||
{
|
||||
wx_simple_messagebox("GLSL error", "Could not load shader %s\n", shader->shader_fn);
|
||||
glslp_free(glslp);
|
||||
return 0;
|
||||
}
|
||||
strip_parameters(shader->shader_program);
|
||||
strip_defines(shader->shader_program);
|
||||
shader->scale_x = shader->scale_y = 1.0f;
|
||||
strcpy(shader->scale_type_x, "source");
|
||||
strcpy(shader->scale_type_y, "source");
|
||||
get_parameters(glslp);
|
||||
return glslp;
|
||||
}
|
||||
|
||||
void get_glslp_name(const char* f, char* s, int size)
|
||||
{
|
||||
safe_strncpy(s, get_filename((char*)f), size);
|
||||
}
|
||||
|
||||
glslp_t* glslp_parse(const char* f)
|
||||
{
|
||||
int i, j, len, sublen;
|
||||
char s[512], t[512], z[512];
|
||||
|
||||
s[511] = 0;
|
||||
if (endswith(f, ".glsl"))
|
||||
return glsl_parse(f);
|
||||
|
||||
void* cfg = wx_config_load(f);
|
||||
|
||||
if (!cfg)
|
||||
{
|
||||
wx_simple_messagebox("GLSLP error", "Could not load GLSLP-file %s\n", f);
|
||||
return 0;
|
||||
}
|
||||
|
||||
glslp_t* glslp = malloc(sizeof(glslp_t));
|
||||
memset(glslp, 0, sizeof(glslp_t));
|
||||
|
||||
get_glslp_name(f, glslp->name, sizeof(glslp->name));
|
||||
|
||||
wx_config_get_int(cfg, "shaders", &glslp->num_shaders, 0);
|
||||
|
||||
for (i = 0; i < glslp->num_shaders; ++i)
|
||||
{
|
||||
struct shader* shader = &glslp->shaders[i];
|
||||
|
||||
|
||||
snprintf(s, sizeof(s)-1, "shader%d", i);
|
||||
if (!wx_config_get_string(cfg, s, t, sizeof(t), 0))
|
||||
{
|
||||
/* shader doesn't exist, lets break here */
|
||||
glslp->num_shaders = i;
|
||||
break;
|
||||
}
|
||||
strcpy(s, f);
|
||||
*get_filename(s) = 0;
|
||||
snprintf(shader->shader_fn, sizeof(shader->shader_fn)-1, "%s%s", s, t);
|
||||
shader->shader_program = load_file(shader->shader_fn);
|
||||
if (!shader->shader_program)
|
||||
{
|
||||
wx_simple_messagebox("GLSL error", "Could not load shader %s\n", shader->shader_fn);
|
||||
glslp_free(glslp);
|
||||
return 0;
|
||||
}
|
||||
strip_parameters(shader->shader_program);
|
||||
strip_defines(shader->shader_program);
|
||||
|
||||
snprintf(s, sizeof(s)-1, "alias%d", i);
|
||||
wx_config_get_string(cfg, s, shader->alias, sizeof(shader->alias), 0);
|
||||
|
||||
snprintf(s, sizeof(s)-1, "filter_linear%d", i);
|
||||
wx_config_get_bool(cfg, s, &shader->filter_linear, 0);
|
||||
|
||||
snprintf(s, sizeof(s)-1, "wrap_mode%d", i);
|
||||
wx_config_get_string(cfg, s, shader->wrap_mode, sizeof(shader->wrap_mode), 0);
|
||||
|
||||
snprintf(s, sizeof(s)-1, "float_framebuffer%d", i);
|
||||
wx_config_get_bool(cfg, s, &shader->float_framebuffer, 0);
|
||||
snprintf(s, sizeof(s)-1, "srgb_framebuffer%d", i);
|
||||
wx_config_get_bool(cfg, s, &shader->srgb_framebuffer, 0);
|
||||
|
||||
snprintf(s, sizeof(s)-1, "mipmap_input%d", i);
|
||||
wx_config_get_bool(cfg, s, &shader->mipmap_input, 0);
|
||||
|
||||
strcpy(shader->scale_type_x, "source");
|
||||
snprintf(s, sizeof(s)-1, "scale_type_x%d", i);
|
||||
wx_config_get_string(cfg, s, shader->scale_type_x, sizeof(shader->scale_type_x), 0);
|
||||
strcpy(shader->scale_type_y, "source");
|
||||
snprintf(s, sizeof(s)-1, "scale_type_y%d", i);
|
||||
wx_config_get_string(cfg, s, shader->scale_type_y, sizeof(shader->scale_type_y), 0);
|
||||
snprintf(s, sizeof(s)-1, "scale_type%d", i);
|
||||
if (wx_config_has_entry(cfg, s))
|
||||
{
|
||||
wx_config_get_string(cfg, s, shader->scale_type_x, sizeof(shader->scale_type_x), 0);
|
||||
wx_config_get_string(cfg, s, shader->scale_type_y, sizeof(shader->scale_type_y), 0);
|
||||
}
|
||||
|
||||
snprintf(s, sizeof(s)-1, "scale_x%d", i);
|
||||
wx_config_get_float(cfg, s, &shader->scale_x, 1.0f);
|
||||
snprintf(s, sizeof(s)-1, "scale_y%d", i);
|
||||
wx_config_get_float(cfg, s, &shader->scale_y, 1.0f);
|
||||
snprintf(s, sizeof(s)-1, "scale%d", i);
|
||||
if (wx_config_has_entry(cfg, s))
|
||||
{
|
||||
wx_config_get_float(cfg, s, &shader->scale_x, 1.0f);
|
||||
wx_config_get_float(cfg, s, &shader->scale_y, 1.0f);
|
||||
}
|
||||
|
||||
snprintf(s, sizeof(s)-1, "frame_count_mod%d", i);
|
||||
wx_config_get_int(cfg, s, &shader->frame_count_mod, 0);
|
||||
}
|
||||
|
||||
/* textures */
|
||||
glslp->num_textures = 0;
|
||||
wx_config_get_string(cfg, "textures", t, sizeof(t), 0);
|
||||
|
||||
len = strlen(t);
|
||||
j = 0;
|
||||
sublen = 0;
|
||||
for (i = 0; i < len; ++i)
|
||||
{
|
||||
if (t[i] == ';' || i == len-1)
|
||||
{
|
||||
sublen = (i-j) + ((i == len-1) ? 1 : 0) + 1;
|
||||
safe_strncpy(s, t+j, sublen);
|
||||
s[511 < sublen ? 511 : sublen] = 0;
|
||||
|
||||
struct texture* tex = &glslp->textures[glslp->num_textures++];
|
||||
|
||||
strcpy(tex->name, s);
|
||||
wx_config_get_string(cfg, s, tex->path, sizeof(tex->path), 0);
|
||||
|
||||
snprintf(z, sizeof(z)-1, "%s_linear", s);
|
||||
wx_config_get_bool(cfg, z, &tex->linear, 0);
|
||||
|
||||
snprintf(z, sizeof(z)-1, "%s_mipmap", s);
|
||||
wx_config_get_bool(cfg, z, &tex->mipmap, 0);
|
||||
|
||||
snprintf(z, sizeof(z)-1, "%s_wrap_mode", s);
|
||||
wx_config_get_string(cfg, z, tex->wrap_mode, sizeof(tex->wrap_mode), 0);
|
||||
|
||||
j = i+1;
|
||||
}
|
||||
}
|
||||
|
||||
/* parameters */
|
||||
get_parameters(glslp);
|
||||
|
||||
wx_config_get_string(cfg, "parameters", t, sizeof(t), 0);
|
||||
|
||||
len = strlen(t);
|
||||
j = 0;
|
||||
sublen = 0;
|
||||
for (i = 0; i < len; ++i)
|
||||
{
|
||||
if (t[i] == ';' || i == len-1)
|
||||
{
|
||||
sublen = (i-j) + ((i == len-1) ? 1 : 0) + 1;
|
||||
safe_strncpy(s, t+j, sublen);
|
||||
s[511 < sublen ? 511 : sublen] = 0;
|
||||
|
||||
struct parameter* p = get_parameter(glslp, s);
|
||||
|
||||
if (p)
|
||||
wx_config_get_float(cfg, s, &p->default_value, 0);
|
||||
|
||||
j = i+1;
|
||||
}
|
||||
}
|
||||
|
||||
wx_config_free(cfg);
|
||||
|
||||
|
||||
return glslp;
|
||||
}
|
||||
|
||||
void glslp_free(glslp_t* p)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < p->num_shaders; ++i)
|
||||
if (p->shaders[i].shader_program)
|
||||
free(p->shaders[i].shader_program);
|
||||
free(p);
|
||||
}
|
||||
54
src/wx-glslp-parser.h
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
#ifndef SRC_WX_GLSLP_PARSER_H_
|
||||
#define SRC_WX_GLSLP_PARSER_H_
|
||||
|
||||
#include "wx-glsl.h"
|
||||
|
||||
struct parameter {
|
||||
char id[64];
|
||||
char description[64];
|
||||
float default_value;
|
||||
float value;
|
||||
float min;
|
||||
float max;
|
||||
float step;
|
||||
};
|
||||
|
||||
struct texture {
|
||||
char path[256];
|
||||
char name[50];
|
||||
int linear;
|
||||
int mipmap;
|
||||
char wrap_mode[50];
|
||||
};
|
||||
|
||||
struct shader {
|
||||
char shader_fn[512];
|
||||
char* shader_program;
|
||||
char alias[64];
|
||||
int filter_linear;
|
||||
int float_framebuffer;
|
||||
int srgb_framebuffer;
|
||||
int mipmap_input;
|
||||
int frame_count_mod;
|
||||
char wrap_mode[50];
|
||||
char scale_type_x[9], scale_type_y[9];
|
||||
float scale_x, scale_y;
|
||||
};
|
||||
|
||||
typedef struct glslp_t {
|
||||
char name[64];
|
||||
int num_shaders;
|
||||
struct shader shaders[MAX_SHADERS];
|
||||
|
||||
int num_textures;
|
||||
struct texture textures[MAX_TEXTURES];
|
||||
|
||||
int num_parameters;
|
||||
struct parameter parameters[MAX_PARAMETERS];
|
||||
} glslp_t;
|
||||
|
||||
void get_glslp_name(const char* f, char* s, int size);
|
||||
glslp_t* glslp_parse(const char* f);
|
||||
void glslp_free(glslp_t* p);
|
||||
|
||||
#endif /* SRC_WX_GLSLP_PARSER_H_ */
|
||||
8734
src/wx-resources.cpp
984
src/wx-sdl2-display-win.c
Normal file
|
|
@ -0,0 +1,984 @@
|
|||
#define _WIN32_WINNT 0x0501
|
||||
#include <SDL2/SDL.h>
|
||||
#include "video.h"
|
||||
#include "wx-sdl2-video.h"
|
||||
#include "wx-utils.h"
|
||||
#include "ibm.h"
|
||||
#include "wx-display.h"
|
||||
#include "plat-keyboard.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define BITMAP WINDOWS_BITMAP
|
||||
#undef UNICODE
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#undef BITMAP
|
||||
#endif
|
||||
|
||||
HHOOK hKeyboardHook;
|
||||
|
||||
static HINSTANCE hinstance = 0;
|
||||
static HWND hwnd = 0;
|
||||
static HMENU menu = 0;
|
||||
|
||||
#define szClassName "PCemMainWnd"
|
||||
#define szSubClassName "PCemSubWnd"
|
||||
|
||||
static RAWINPUTDEVICE device;
|
||||
static uint16_t scancode_map[65536];
|
||||
|
||||
SDL_mutex* rendererMutex;
|
||||
SDL_cond* rendererCond;
|
||||
SDL_Thread* renderthread = NULL;
|
||||
|
||||
SDL_Window* window = NULL;
|
||||
SDL_Window* dummy_window = NULL;
|
||||
|
||||
int rendering = 0;
|
||||
|
||||
int mousecapture = 0;
|
||||
|
||||
extern int pause;
|
||||
extern int video_scale;
|
||||
extern int take_screenshot;
|
||||
|
||||
void* window_ptr;
|
||||
void* menu_ptr;
|
||||
|
||||
SDL_Rect remembered_rect;
|
||||
int remembered_mouse_x = 0;
|
||||
int remembered_mouse_y = 0;
|
||||
|
||||
int win_doresize = 0;
|
||||
int winsizex = 640, winsizey = 480;
|
||||
|
||||
void renderer_start();
|
||||
void renderer_stop(int timeout);
|
||||
|
||||
int trigger_fullscreen = 0;
|
||||
int trigger_screenshot = 0;
|
||||
int trigger_togglewindow = 0;
|
||||
int trigger_inputrelease = 0;
|
||||
|
||||
extern void device_force_redraw();
|
||||
extern void mouse_wheel_update(int);
|
||||
extern void toggle_fullscreen();
|
||||
|
||||
void display_resize(int width, int height)
|
||||
{
|
||||
winsizex = width*(video_scale+1) >> 1;
|
||||
winsizey = height*(video_scale+1) >> 1;
|
||||
|
||||
SDL_Rect rect;
|
||||
rect.x = rect.y = 0;
|
||||
rect.w = winsizex;
|
||||
rect.h = winsizey;
|
||||
sdl_scale(video_fullscreen_scale, rect, &rect, winsizex, winsizey);
|
||||
winsizex = rect.w;
|
||||
winsizey = rect.h;
|
||||
|
||||
win_doresize = 1;
|
||||
}
|
||||
|
||||
void releasemouse()
|
||||
{
|
||||
if (mousecapture)
|
||||
{
|
||||
SDL_SetWindowGrab(window, SDL_FALSE);
|
||||
SDL_SetRelativeMouseMode(SDL_FALSE);
|
||||
mousecapture = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int is_fullscreen()
|
||||
{
|
||||
if (window)
|
||||
{
|
||||
int flags = SDL_GetWindowFlags(window);
|
||||
return (flags&SDL_WINDOW_FULLSCREEN) || (flags&SDL_WINDOW_FULLSCREEN_DESKTOP);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This is so we can disambiguate scan codes that would otherwise conflict and get
|
||||
passed on incorrectly. */
|
||||
UINT16 convert_scan_code(UINT16 scan_code)
|
||||
{
|
||||
switch (scan_code)
|
||||
{
|
||||
case 0xE001:
|
||||
return 0xF001;
|
||||
case 0xE002:
|
||||
return 0xF002;
|
||||
case 0xE005:
|
||||
return 0xF005;
|
||||
case 0xE006:
|
||||
return 0xF006;
|
||||
case 0xE007:
|
||||
return 0xF007;
|
||||
case 0xE071:
|
||||
return 0xF008;
|
||||
case 0xE072:
|
||||
return 0xF009;
|
||||
case 0xE07F:
|
||||
return 0xF00A;
|
||||
case 0xE0E1:
|
||||
return 0xF00B;
|
||||
case 0xE0EE:
|
||||
return 0xF00C;
|
||||
case 0xE0F1:
|
||||
return 0xF00D;
|
||||
case 0xE0FE:
|
||||
return 0xF00E;
|
||||
case 0xE0EF:
|
||||
return 0xF00F;
|
||||
|
||||
default:
|
||||
return scan_code;
|
||||
}
|
||||
}
|
||||
|
||||
void get_registry_key_map()
|
||||
{
|
||||
char *keyName = "SYSTEM\\CurrentControlSet\\Control\\Keyboard Layout";
|
||||
char *valueName = "Scancode Map";
|
||||
char buf[32768];
|
||||
DWORD bufSize;
|
||||
HKEY hKey;
|
||||
int j;
|
||||
|
||||
/* First, prepare the default scan code map list which is 1:1.
|
||||
Remappings will be inserted directly into it.
|
||||
65536 bytes so scan codes fit in easily and it's easy to find what each maps too,
|
||||
since each array element is a scan code and provides for E0, etc. ones too. */
|
||||
for (j = 0; j < 65536; j++)
|
||||
scancode_map[j] = convert_scan_code(j);
|
||||
|
||||
bufSize = 32768;
|
||||
pclog("Preparing scan code map list...\n");
|
||||
/* Get the scan code remappings from:
|
||||
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout */
|
||||
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, keyName, 0, 1, &hKey) == ERROR_SUCCESS)
|
||||
{
|
||||
if(RegQueryValueEx(hKey, valueName, NULL, NULL, (LPBYTE)buf, &bufSize) == ERROR_SUCCESS)
|
||||
{
|
||||
UINT32 *bufEx2 = (UINT32 *) buf;
|
||||
int scMapCount = bufEx2[2];
|
||||
pclog("%lu scan code mappings found!\n", scMapCount);
|
||||
if ((bufSize != 0) && (scMapCount != 0))
|
||||
{
|
||||
UINT16 *bufEx = (UINT16 *) (buf + 12);
|
||||
pclog("More than zero scan code mappings found, processing...\n");
|
||||
for (j = 0; j < scMapCount*2; j += 2)
|
||||
{
|
||||
/* Each scan code is 32-bit: 16 bits of remapped scan code,
|
||||
and 16 bits of original scan code. */
|
||||
int scancode_unmapped = bufEx[j + 1];
|
||||
int scancode_mapped = bufEx[j];
|
||||
|
||||
scancode_mapped = convert_scan_code(scancode_mapped);
|
||||
|
||||
scancode_map[scancode_unmapped] = scancode_mapped;
|
||||
pclog("Scan code mapping %u detected: %X -> %X\n", scancode_unmapped, scancode_mapped, scancode_map[scancode_unmapped]);
|
||||
}
|
||||
pclog("Done processing!\n");
|
||||
}
|
||||
}
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
pclog("Done preparing!\n");
|
||||
}
|
||||
|
||||
LRESULT CALLBACK LowLevelKeyboardProc( int nCode, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
if (nCode < 0 || nCode != HC_ACTION || (!mousecapture && !video_fullscreen))
|
||||
return CallNextHookEx( hKeyboardHook, nCode, wParam, lParam);
|
||||
|
||||
KBDLLHOOKSTRUCT* p = (KBDLLHOOKSTRUCT*)lParam;
|
||||
|
||||
if (p->vkCode == VK_TAB && p->flags & LLKHF_ALTDOWN) return 1; //disable alt-tab
|
||||
if (p->vkCode == VK_SPACE && p->flags & LLKHF_ALTDOWN) return 1; //disable alt-tab
|
||||
if((p->vkCode == VK_LWIN) || (p->vkCode == VK_RWIN)) return 1;//disable windows keys
|
||||
if (p->vkCode == VK_ESCAPE && p->flags & LLKHF_ALTDOWN) return 1;//disable alt-escape
|
||||
BOOL bControlKeyDown = GetAsyncKeyState (VK_CONTROL) >> ((sizeof(SHORT) * 8) - 1);//checks ctrl key pressed
|
||||
if (p->vkCode == VK_ESCAPE && bControlKeyDown) return 1; //disable ctrl-escape
|
||||
|
||||
return CallNextHookEx( hKeyboardHook, nCode, wParam, lParam );
|
||||
}
|
||||
|
||||
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WM_COMMAND:
|
||||
/* pass through commands to wx window */
|
||||
wx_winsendmessage(window_ptr, message, wParam, lParam);
|
||||
return 0;
|
||||
break;
|
||||
case WM_INPUT:
|
||||
{
|
||||
UINT size;
|
||||
RAWINPUT *raw;
|
||||
|
||||
if (!infocus)
|
||||
break;
|
||||
|
||||
GetRawInputData((HRAWINPUT)lParam, RID_INPUT, NULL, &size, sizeof(RAWINPUTHEADER));
|
||||
|
||||
raw = malloc(size);
|
||||
|
||||
/* Here we read the raw input data for the keyboard */
|
||||
GetRawInputData((HRAWINPUT)(lParam), RID_INPUT, raw, &size, sizeof(RAWINPUTHEADER));
|
||||
|
||||
/* If the input is keyboard, we process it */
|
||||
if (raw->header.dwType == RIM_TYPEKEYBOARD)
|
||||
{
|
||||
const RAWKEYBOARD rawKB = raw->data.keyboard;
|
||||
USHORT scancode = rawKB.MakeCode;
|
||||
|
||||
// pclog("Keyboard input received: S:%X VK:%X F:%X\n", c, d, e);
|
||||
|
||||
/* If it's not a scan code that starts with 0xE1 */
|
||||
if (!(rawKB.Flags & RI_KEY_E1))
|
||||
{
|
||||
if (rawKB.Flags & RI_KEY_E0)
|
||||
scancode |= (0xE0 << 8);
|
||||
|
||||
/* Remap it according to the list from the Registry */
|
||||
scancode = scancode_map[scancode];
|
||||
|
||||
if ((scancode >> 8) == 0xF0)
|
||||
scancode |= 0x100; /* Extended key code in disambiguated format */
|
||||
else if ((scancode >> 8) == 0xE0)
|
||||
scancode |= 0x80; /* Normal extended key code */
|
||||
|
||||
/* If it's not 0 (therefore not 0xE1, 0xE2, etc),
|
||||
then pass it on to the rawinputkey array */
|
||||
if (!(scancode & 0xf00))
|
||||
rawinputkey[scancode & 0x1ff] = !(rawKB.Flags & RI_KEY_BREAK);
|
||||
}
|
||||
}
|
||||
free(raw);
|
||||
|
||||
}
|
||||
break;
|
||||
case WM_SETFOCUS:
|
||||
infocus=1;
|
||||
break;
|
||||
case WM_KILLFOCUS:
|
||||
infocus=0;
|
||||
if (is_fullscreen())
|
||||
window_dowindowed = 1;
|
||||
window_doinputrelease = 1;
|
||||
memset(rawinputkey, 0, sizeof(rawinputkey));
|
||||
break;
|
||||
case WM_CLOSE:
|
||||
case WM_DESTROY:
|
||||
case WM_KEYDOWN:
|
||||
case WM_SYSKEYDOWN:
|
||||
case WM_KEYUP:
|
||||
case WM_SYSKEYUP:
|
||||
return 0;
|
||||
|
||||
case WM_SYSCOMMAND:
|
||||
if (wParam == SC_KEYMENU && HIWORD(lParam) <= 0 && (video_fullscreen || mousecapture))
|
||||
return 0; /*disable ALT key for menu*/
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return DefWindowProc (hwnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
LRESULT CALLBACK subWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
default:
|
||||
return DefWindowProc(hwnd, message, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int display_init()
|
||||
{
|
||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0)
|
||||
{
|
||||
printf("SDL could not initialize! Error: %s\n", SDL_GetError());
|
||||
return 0;
|
||||
}
|
||||
|
||||
SDL_version ver;
|
||||
SDL_GetVersion(&ver);
|
||||
printf("SDL %i.%i.%i initialized.\n", ver.major, ver.minor, ver.patch);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void display_close()
|
||||
{
|
||||
SDL_Quit();
|
||||
}
|
||||
|
||||
void display_start(void* wnd_ptr)
|
||||
{
|
||||
window_ptr = wnd_ptr;
|
||||
menu_ptr = wx_getmenu(wnd_ptr);
|
||||
|
||||
get_registry_key_map();
|
||||
|
||||
infocus = 1;
|
||||
|
||||
atexit(releasemouse);
|
||||
rendererMutex = SDL_CreateMutex();
|
||||
rendererCond = SDL_CreateCond();
|
||||
renderer_start();
|
||||
}
|
||||
|
||||
void display_stop()
|
||||
{
|
||||
renderer_stop(10 * 1000);
|
||||
|
||||
SDL_DestroyMutex(rendererMutex);
|
||||
SDL_DestroyCond(rendererCond);
|
||||
SDL_DetachThread(renderthread);
|
||||
releasemouse();
|
||||
|
||||
}
|
||||
|
||||
void sdl_set_window_title(const char* title) {
|
||||
if (hwnd && !is_fullscreen())
|
||||
SetWindowText(hwnd, title);
|
||||
}
|
||||
|
||||
int get_border_size(int* top, int* left, int* bottom, int* right)
|
||||
{
|
||||
int res = SDL_GetWindowBordersSize(window, top, left, bottom, right);
|
||||
if (top) *top -= GetSystemMetrics(SM_CYMENUSIZE);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static const struct {
|
||||
SDL_Scancode sdl;
|
||||
int system;
|
||||
} SDLScancodeToSystemScancode[] = {
|
||||
{ SDL_SCANCODE_A, 0x1e },
|
||||
{ SDL_SCANCODE_B, 0x30 },
|
||||
{ SDL_SCANCODE_C, 0x2e },
|
||||
{ SDL_SCANCODE_D, 0x20 },
|
||||
{ SDL_SCANCODE_E, 0x12 },
|
||||
{ SDL_SCANCODE_F, 0x21 },
|
||||
{ SDL_SCANCODE_G, 0x22 },
|
||||
{ SDL_SCANCODE_H, 0x23 },
|
||||
{ SDL_SCANCODE_I, 0x17 },
|
||||
{ SDL_SCANCODE_J, 0x24 },
|
||||
{ SDL_SCANCODE_K, 0x25 },
|
||||
{ SDL_SCANCODE_L, 0x26 },
|
||||
{ SDL_SCANCODE_M, 0x32 },
|
||||
{ SDL_SCANCODE_N, 0x31 },
|
||||
{ SDL_SCANCODE_O, 0x18 },
|
||||
{ SDL_SCANCODE_P, 0x19 },
|
||||
{ SDL_SCANCODE_Q, 0x10 },
|
||||
{ SDL_SCANCODE_R, 0x13 },
|
||||
{ SDL_SCANCODE_S, 0x1f },
|
||||
{ SDL_SCANCODE_T, 0x14 },
|
||||
{ SDL_SCANCODE_U, 0x16 },
|
||||
{ SDL_SCANCODE_V, 0x2f },
|
||||
{ SDL_SCANCODE_W, 0x11 },
|
||||
{ SDL_SCANCODE_X, 0x2d },
|
||||
{ SDL_SCANCODE_Y, 0x15 },
|
||||
{ SDL_SCANCODE_Z, 0x2c },
|
||||
{ SDL_SCANCODE_0, 0x0B },
|
||||
{ SDL_SCANCODE_1, 0x02 },
|
||||
{ SDL_SCANCODE_2, 0x03 },
|
||||
{ SDL_SCANCODE_3, 0x04 },
|
||||
{ SDL_SCANCODE_4, 0x05 },
|
||||
{ SDL_SCANCODE_5, 0x06 },
|
||||
{ SDL_SCANCODE_6, 0x07 },
|
||||
{ SDL_SCANCODE_7, 0x08 },
|
||||
{ SDL_SCANCODE_8, 0x09 },
|
||||
{ SDL_SCANCODE_9, 0x0A },
|
||||
{ SDL_SCANCODE_GRAVE, 0x29 },
|
||||
{ SDL_SCANCODE_MINUS, 0x0c },
|
||||
{ SDL_SCANCODE_EQUALS, 0x0d },
|
||||
{ SDL_SCANCODE_NONUSBACKSLASH, 0x56 },
|
||||
{ SDL_SCANCODE_BACKSLASH, 0x2b },
|
||||
{ SDL_SCANCODE_BACKSPACE, 0x0e },
|
||||
{ SDL_SCANCODE_SPACE, 0x39 },
|
||||
{ SDL_SCANCODE_TAB, 0x0f },
|
||||
{ SDL_SCANCODE_CAPSLOCK, 0x3a },
|
||||
{ SDL_SCANCODE_LSHIFT, 0x2a },
|
||||
{ SDL_SCANCODE_LCTRL, 0x1d },
|
||||
{ SDL_SCANCODE_LGUI, 0xdb },
|
||||
{ SDL_SCANCODE_LALT, 0x38 },
|
||||
{ SDL_SCANCODE_RSHIFT, 0x36 },
|
||||
{ SDL_SCANCODE_RCTRL, 0x9d },
|
||||
{ SDL_SCANCODE_RGUI, 0xdc },
|
||||
{ SDL_SCANCODE_RALT, 0xb8 },
|
||||
{ SDL_SCANCODE_SYSREQ, 0x54 },
|
||||
{ SDL_SCANCODE_APPLICATION, 0xdd },
|
||||
{ SDL_SCANCODE_RETURN, 0x1c },
|
||||
{ SDL_SCANCODE_ESCAPE, 0x01 },
|
||||
{ SDL_SCANCODE_F1, 0x3B },
|
||||
{ SDL_SCANCODE_F2, 0x3C },
|
||||
{ SDL_SCANCODE_F3, 0x3D },
|
||||
{ SDL_SCANCODE_F4, 0x3e },
|
||||
{ SDL_SCANCODE_F5, 0x3f },
|
||||
{ SDL_SCANCODE_F6, 0x40 },
|
||||
{ SDL_SCANCODE_F7, 0x41 },
|
||||
{ SDL_SCANCODE_F8, 0x42 },
|
||||
{ SDL_SCANCODE_F9, 0x43 },
|
||||
{ SDL_SCANCODE_F10, 0x44 },
|
||||
{ SDL_SCANCODE_F11, 0x57 },
|
||||
{ SDL_SCANCODE_F12, 0x58 },
|
||||
{ SDL_SCANCODE_SCROLLLOCK, 0x46 },
|
||||
{ SDL_SCANCODE_LEFTBRACKET, 0x1a },
|
||||
{ SDL_SCANCODE_RIGHTBRACKET, 0x1b },
|
||||
{ SDL_SCANCODE_INSERT, 0xd2 },
|
||||
{ SDL_SCANCODE_HOME, 0xc7 },
|
||||
{ SDL_SCANCODE_PAGEUP, 0xc9 },
|
||||
{ SDL_SCANCODE_DELETE, 0xd3 },
|
||||
{ SDL_SCANCODE_END, 0xcf },
|
||||
{ SDL_SCANCODE_PAGEDOWN, 0xd1 },
|
||||
{ SDL_SCANCODE_UP, 0xc8 },
|
||||
{ SDL_SCANCODE_LEFT, 0xcb },
|
||||
{ SDL_SCANCODE_DOWN, 0xd0 },
|
||||
{ SDL_SCANCODE_RIGHT, 0xcd },
|
||||
{ SDL_SCANCODE_NUMLOCKCLEAR, 0x45 },
|
||||
{ SDL_SCANCODE_KP_DIVIDE, 0xb5 },
|
||||
{ SDL_SCANCODE_KP_MULTIPLY, 0x37 },
|
||||
{ SDL_SCANCODE_KP_MINUS, 0x4a },
|
||||
{ SDL_SCANCODE_KP_PLUS, 0x4e },
|
||||
{ SDL_SCANCODE_KP_ENTER, 0x9c },
|
||||
{ SDL_SCANCODE_KP_PERIOD, 0x53 },
|
||||
{ SDL_SCANCODE_KP_0, 0x52 },
|
||||
{ SDL_SCANCODE_KP_1, 0x4f },
|
||||
{ SDL_SCANCODE_KP_2, 0x50 },
|
||||
{ SDL_SCANCODE_KP_3, 0x51 },
|
||||
{ SDL_SCANCODE_KP_4, 0x48 },
|
||||
{ SDL_SCANCODE_KP_5, 0x4c },
|
||||
{ SDL_SCANCODE_KP_6, 0x4d },
|
||||
{ SDL_SCANCODE_KP_7, 0x47 },
|
||||
{ SDL_SCANCODE_KP_8, 0x48 },
|
||||
{ SDL_SCANCODE_KP_9, 0x49 },
|
||||
{ SDL_SCANCODE_SEMICOLON, 0x27 },
|
||||
{ SDL_SCANCODE_APOSTROPHE, 0x28 },
|
||||
{ SDL_SCANCODE_COMMA, 0x33 },
|
||||
{ SDL_SCANCODE_PERIOD, 0x34 },
|
||||
{ SDL_SCANCODE_SLASH, 0x35 },
|
||||
{ SDL_SCANCODE_PRINTSCREEN, 0xb7 }
|
||||
};
|
||||
|
||||
int sdl_scancode(SDL_Scancode scancode)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < SDL_arraysize(SDLScancodeToSystemScancode); ++i) {
|
||||
if (SDLScancodeToSystemScancode[i].sdl == scancode) {
|
||||
return SDLScancodeToSystemScancode[i].system;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
SDL_Event event;
|
||||
SDL_Rect rect;
|
||||
int border_x, border_y = 0;
|
||||
|
||||
uint64_t render_time = 0;
|
||||
int render_fps = 0;
|
||||
uint32_t render_frame_time = 0;
|
||||
uint32_t render_frames = 0;
|
||||
|
||||
void window_setup()
|
||||
{
|
||||
SDL_SetHint(SDL_HINT_GRAB_KEYBOARD, "0");
|
||||
SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1");
|
||||
SDL_SetHint(SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4, "1");
|
||||
|
||||
if (start_in_fullscreen)
|
||||
{
|
||||
start_in_fullscreen = 0;
|
||||
window_dofullscreen = 1;
|
||||
window_doinputgrab = 1;
|
||||
}
|
||||
|
||||
if (window_remember)
|
||||
{
|
||||
rect.x = window_x;
|
||||
rect.y = window_y;
|
||||
rect.w = window_w;
|
||||
rect.h = window_h;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.x = SDL_WINDOWPOS_CENTERED;
|
||||
rect.y = SDL_WINDOWPOS_CENTERED;
|
||||
rect.w = 640;
|
||||
rect.h = 480;
|
||||
}
|
||||
}
|
||||
|
||||
int window_create()
|
||||
{
|
||||
int i;
|
||||
WNDCLASSEX wincl; /* Data structure for the windowclass */
|
||||
|
||||
hinstance = (HINSTANCE)GetModuleHandle(NULL);
|
||||
/* The Window structure */
|
||||
wincl.hInstance = hinstance;
|
||||
wincl.lpszClassName = szClassName;
|
||||
wincl.lpfnWndProc = WindowProcedure; /* This function is called by windows */
|
||||
wincl.style = CS_DBLCLKS; /* Catch double-clicks */
|
||||
wincl.cbSize = sizeof (WNDCLASSEX);
|
||||
|
||||
/* Use default icon and mouse-pointer */
|
||||
wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
|
||||
wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
|
||||
wincl.hCursor = NULL;//LoadCursor (NULL, IDC_ARROW);
|
||||
wincl.lpszMenuName = NULL; /* No menu */
|
||||
wincl.cbClsExtra = 0; /* No extra bytes after the window class */
|
||||
wincl.cbWndExtra = 0; /* structure or the window instance */
|
||||
/* Use Windows's default color as the background of the window */
|
||||
wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
|
||||
|
||||
/* Register the window class, and if it fails quit the program */
|
||||
if (!RegisterClassEx(&wincl))
|
||||
return 0;
|
||||
|
||||
wincl.lpszClassName = szSubClassName;
|
||||
wincl.lpfnWndProc = subWindowProcedure; /* This function is called by windows */
|
||||
|
||||
if (!RegisterClassEx(&wincl))
|
||||
return 0;
|
||||
|
||||
menu = CreateMenu();
|
||||
HMENU native_menu = (HMENU)wx_getnativemenu(menu_ptr);
|
||||
int count = GetMenuItemCount(native_menu);
|
||||
MENUITEMINFO info;
|
||||
for (i = 0; i < count; ++i)
|
||||
{
|
||||
char label[256];
|
||||
memset(&info, 0, sizeof(MENUITEMINFO));
|
||||
info.cbSize = sizeof(MENUITEMINFO);
|
||||
info.fMask = MIIM_TYPE | MIIM_ID;
|
||||
info.fType = MFT_STRING;
|
||||
info.cch = 256;
|
||||
info.dwTypeData = label;
|
||||
if (GetMenuItemInfo(native_menu, i, 1, &info))
|
||||
AppendMenu(menu, MF_STRING | MF_POPUP, (UINT)GetSubMenu(native_menu, i), info.dwTypeData);
|
||||
}
|
||||
|
||||
/* The class is registered, let's create the program*/
|
||||
hwnd = CreateWindowEx (
|
||||
0, /* Extended possibilites for variation */
|
||||
szClassName, /* Classname */
|
||||
"PCem v12", /* Title Text */
|
||||
WS_OVERLAPPEDWINDOW&~WS_SIZEBOX, /* default window */
|
||||
CW_USEDEFAULT, /* Windows decides the position */
|
||||
CW_USEDEFAULT, /* where the window ends up on the screen */
|
||||
640+(GetSystemMetrics(SM_CXFIXEDFRAME)*2), /* The programs width */
|
||||
480+(GetSystemMetrics(SM_CYFIXEDFRAME)*2)+GetSystemMetrics(SM_CYMENUSIZE)+GetSystemMetrics(SM_CYCAPTION)+1, /* and height in pixels */
|
||||
HWND_DESKTOP, /* The window is a child-window to desktop */
|
||||
menu, /* Menu */
|
||||
hinstance, /* Program Instance handler */
|
||||
NULL /* No Window Creation data */
|
||||
);
|
||||
|
||||
/* Make the window visible on the screen */
|
||||
ShowWindow(hwnd, 1);
|
||||
|
||||
memset(rawinputkey, 0, sizeof(rawinputkey));
|
||||
device.usUsagePage = 0x01;
|
||||
device.usUsage = 0x06;
|
||||
device.dwFlags = RIDEV_NOHOTKEYS;
|
||||
device.hwndTarget = hwnd;
|
||||
|
||||
if (RegisterRawInputDevices(&device, 1, sizeof(device)))
|
||||
pclog("Raw input registered!\n");
|
||||
else
|
||||
pclog("Raw input registration failed!\n");
|
||||
|
||||
hKeyboardHook = SetWindowsHookEx( WH_KEYBOARD_LL, LowLevelKeyboardProc, GetModuleHandle(NULL), 0 );
|
||||
|
||||
if (requested_render_driver.sdl_window_params & SDL_WINDOW_OPENGL)
|
||||
{
|
||||
/* create dummy window for opengl */
|
||||
dummy_window = SDL_CreateWindow("GL3 test", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 1, 1, SDL_WINDOW_HIDDEN | SDL_WINDOW_OPENGL);
|
||||
if (dummy_window)
|
||||
{
|
||||
char ptr[32];
|
||||
snprintf(ptr, 31, "%p", dummy_window);
|
||||
ptr[31] = 0;
|
||||
SDL_SetHint(SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT, ptr);
|
||||
}
|
||||
}
|
||||
window = SDL_CreateWindowFrom(hwnd);
|
||||
if (!window)
|
||||
{
|
||||
char message[200];
|
||||
sprintf(message,
|
||||
"SDL window could not be created! Error: %s\n",
|
||||
SDL_GetError());
|
||||
wx_messagebox(window_ptr, message, "SDL Error", WX_MB_OK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
SDL_SetWindowPosition(window, rect.x, rect.y);
|
||||
SDL_SetWindowSize(window, rect.w, rect.h);
|
||||
|
||||
if (vid_resize)
|
||||
window_dosetresize = 1;
|
||||
|
||||
render_time = 0;
|
||||
render_fps = 0;
|
||||
render_frame_time = SDL_GetTicks();
|
||||
render_frames = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void window_close()
|
||||
{
|
||||
int i;
|
||||
sdl_renderer_close();
|
||||
|
||||
int count = GetMenuItemCount(menu);
|
||||
for (i = 0; i < count; ++i)
|
||||
RemoveMenu(menu, 0, MF_BYPOSITION);
|
||||
DestroyMenu(menu);
|
||||
menu = 0;
|
||||
SetMenu(hwnd, 0);
|
||||
|
||||
if (window) {
|
||||
SDL_GetWindowPosition(window, &rect.x, &rect.y);
|
||||
SDL_GetWindowSize(window, &rect.w, &rect.h);
|
||||
get_border_size(&border_y, &border_x, 0, 0);
|
||||
rect.x -= border_x;
|
||||
rect.y -= border_y;
|
||||
|
||||
SDL_DestroyWindow(window);
|
||||
}
|
||||
window = NULL;
|
||||
|
||||
if (dummy_window)
|
||||
{
|
||||
SDL_SetHint(SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT, "");
|
||||
SDL_DestroyWindow(dummy_window);
|
||||
}
|
||||
dummy_window = NULL;
|
||||
|
||||
UnhookWindowsHookEx( hKeyboardHook );
|
||||
DestroyWindow(hwnd);
|
||||
hwnd = NULL;
|
||||
|
||||
UnregisterClass(szSubClassName, hinstance);
|
||||
UnregisterClass(szClassName, hinstance);
|
||||
|
||||
}
|
||||
|
||||
int render()
|
||||
{
|
||||
uint64_t start_time = timer_read();
|
||||
uint64_t end_time;
|
||||
|
||||
if (window_doreset)
|
||||
{
|
||||
pclog("window_doreset\n");
|
||||
window_doreset = 0;
|
||||
renderer_doreset = 0;
|
||||
return 0;
|
||||
}
|
||||
if (window_dosetresize)
|
||||
{
|
||||
window_dosetresize = 0;
|
||||
SDL_GetWindowSize(window, &rect.w, &rect.h);
|
||||
SDL_SetWindowResizable(window, vid_resize);
|
||||
SDL_SetWindowSize(window, rect.w, rect.h);
|
||||
}
|
||||
if (renderer_doreset)
|
||||
{
|
||||
pclog("renderer_doreset\n");
|
||||
renderer_doreset = 0;
|
||||
sdl_renderer_close();
|
||||
sdl_renderer_init(window);
|
||||
|
||||
device_force_redraw();
|
||||
video_wait_for_blit();
|
||||
}
|
||||
while(SDL_PollEvent(&event))
|
||||
{
|
||||
switch (event.type) {
|
||||
case SDL_MOUSEBUTTONUP:
|
||||
if (!mousecapture)
|
||||
{
|
||||
if (event.button.button == SDL_BUTTON_LEFT && !pause)
|
||||
{
|
||||
window_doinputgrab = 1;
|
||||
if (video_fullscreen)
|
||||
window_dofullscreen = 1;
|
||||
}
|
||||
}
|
||||
else if (event.button.button == SDL_BUTTON_MIDDLE && !is_fullscreen())
|
||||
window_doinputrelease = 1;
|
||||
break;
|
||||
case SDL_MOUSEWHEEL:
|
||||
if (mousecapture) mouse_wheel_update(event.wheel.y);
|
||||
break;
|
||||
case SDL_WINDOWEVENT:
|
||||
if (event.window.event == SDL_WINDOWEVENT_CLOSE)
|
||||
wx_stop_emulation(window_ptr);
|
||||
|
||||
if (window_remember)
|
||||
{
|
||||
int flags = SDL_GetWindowFlags(window);
|
||||
if (!(flags&SDL_WINDOW_FULLSCREEN) && !(flags&SDL_WINDOW_FULLSCREEN_DESKTOP))
|
||||
{
|
||||
if (event.window.event == SDL_WINDOWEVENT_MOVED)
|
||||
{
|
||||
get_border_size(&border_y, &border_x, 0, 0);
|
||||
window_x = event.window.data1-border_x;
|
||||
window_y = event.window.data2-border_y;
|
||||
}
|
||||
else if (event.window.event == SDL_WINDOWEVENT_RESIZED)
|
||||
{
|
||||
window_w = event.window.data1;
|
||||
window_h = event.window.data2;
|
||||
}
|
||||
//save_window_pos = 1;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (rawinputkey[sdl_scancode(SDL_SCANCODE_PAGEDOWN)] &&
|
||||
(rawinputkey[sdl_scancode(SDL_SCANCODE_LCTRL)] || rawinputkey[sdl_scancode(SDL_SCANCODE_RCTRL)]) &&
|
||||
(rawinputkey[sdl_scancode(SDL_SCANCODE_LALT)] || rawinputkey[sdl_scancode(SDL_SCANCODE_RALT)]))
|
||||
trigger_fullscreen = 1;
|
||||
else if (trigger_fullscreen)
|
||||
{
|
||||
trigger_fullscreen = 0;
|
||||
toggle_fullscreen();
|
||||
}
|
||||
else if (rawinputkey[sdl_scancode(SDL_SCANCODE_PAGEUP)] &&
|
||||
(rawinputkey[sdl_scancode(SDL_SCANCODE_LCTRL)] || rawinputkey[sdl_scancode(SDL_SCANCODE_RCTRL)]) &&
|
||||
(rawinputkey[sdl_scancode(SDL_SCANCODE_LALT)] || rawinputkey[sdl_scancode(SDL_SCANCODE_RALT)]))
|
||||
trigger_screenshot = 1;
|
||||
else if (trigger_screenshot)
|
||||
{
|
||||
trigger_screenshot = 0;
|
||||
take_screenshot = 1;
|
||||
}
|
||||
else if (event.key.keysym.scancode == SDL_SCANCODE_END &&
|
||||
(rawinputkey[sdl_scancode(SDL_SCANCODE_LCTRL)] || rawinputkey[sdl_scancode(SDL_SCANCODE_RCTRL)]))
|
||||
trigger_inputrelease = 1;
|
||||
else if (trigger_inputrelease)
|
||||
{
|
||||
trigger_inputrelease = 0;
|
||||
if (!is_fullscreen())
|
||||
window_doinputrelease = 1;
|
||||
}
|
||||
if (window_doremember)
|
||||
{
|
||||
window_doremember = 0;
|
||||
SDL_GetWindowPosition(window, &window_x, &window_y);
|
||||
SDL_GetWindowSize(window, &window_w, &window_h);
|
||||
get_border_size(&border_y, &border_x, 0, 0);
|
||||
window_x -= border_x;
|
||||
window_y -= border_y;
|
||||
saveconfig(NULL);
|
||||
}
|
||||
|
||||
if (window_dotogglefullscreen)
|
||||
{
|
||||
window_dotogglefullscreen = 0;
|
||||
if (SDL_GetWindowGrab(window) || is_fullscreen())
|
||||
{
|
||||
window_doinputrelease = 1;
|
||||
if (is_fullscreen())
|
||||
window_dowindowed = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
window_doinputgrab = 1;
|
||||
window_dofullscreen = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (window_dofullscreen)
|
||||
{
|
||||
window_dofullscreen = 0;
|
||||
SetMenu(hwnd, 0);
|
||||
video_wait_for_blit();
|
||||
SDL_RaiseWindow(window);
|
||||
SDL_GetGlobalMouseState(&remembered_mouse_x, &remembered_mouse_y);
|
||||
SDL_GetWindowPosition(window, &remembered_rect.x, &remembered_rect.y);
|
||||
get_border_size(&border_y, &border_x, 0, 0);
|
||||
remembered_rect.x -= border_x;
|
||||
remembered_rect.y -= border_y;
|
||||
SDL_GetWindowSize(window, &remembered_rect.w, &remembered_rect.h);
|
||||
SDL_SetWindowFullscreen(window, video_fullscreen_mode == 0 ? SDL_WINDOW_FULLSCREEN_DESKTOP : SDL_WINDOW_FULLSCREEN);
|
||||
}
|
||||
if (window_doinputgrab) {
|
||||
window_doinputgrab = 0;
|
||||
mousecapture = 1;
|
||||
SDL_GetRelativeMouseState(0, 0);
|
||||
SDL_SetWindowGrab(window, SDL_TRUE);
|
||||
SDL_SetRelativeMouseMode(SDL_TRUE);
|
||||
}
|
||||
if (mousecapture)
|
||||
{
|
||||
SDL_Rect rect;
|
||||
SDL_GetWindowSize(window, &rect.w, &rect.h);
|
||||
SDL_WarpMouseInWindow(window, rect.w/2, rect.h/2);
|
||||
}
|
||||
|
||||
if (window_doinputrelease) {
|
||||
window_doinputrelease = 0;
|
||||
releasemouse();
|
||||
}
|
||||
if (window_dowindowed)
|
||||
{
|
||||
window_dowindowed = 0;
|
||||
SetMenu(hwnd, menu);
|
||||
SDL_SetWindowFullscreen(window, 0);
|
||||
SDL_SetWindowSize(window, remembered_rect.w, remembered_rect.h);
|
||||
SDL_SetWindowPosition(window, remembered_rect.x, remembered_rect.y);
|
||||
SDL_WarpMouseGlobal(remembered_mouse_x, remembered_mouse_y);
|
||||
}
|
||||
|
||||
if (win_doresize)
|
||||
{
|
||||
win_doresize = 0;
|
||||
if (!vid_resize || (flags&SDL_WINDOW_FULLSCREEN)) {
|
||||
SDL_GetWindowSize(window, &rect.w, &rect.h);
|
||||
if (rect.w != winsizex || rect.h != winsizey) {
|
||||
SDL_GetWindowPosition(window, &rect.x, &rect.y);
|
||||
SDL_SetWindowSize(window, winsizex, winsizey);
|
||||
SDL_SetWindowPosition(window, rect.x, rect.y);
|
||||
device_force_redraw();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sdl_renderer_update(window)) sdl_renderer_present(window);
|
||||
|
||||
end_time = timer_read();
|
||||
render_time += end_time - start_time;
|
||||
|
||||
++render_frames;
|
||||
uint32_t ticks = SDL_GetTicks();
|
||||
if (ticks-render_frame_time >= 1000) {
|
||||
render_fps = render_frames/((ticks-render_frame_time)/1000.0);
|
||||
render_frames = 0;
|
||||
render_frame_time = ticks;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int renderer_thread(void* params)
|
||||
{
|
||||
int internal_rendering;
|
||||
|
||||
SDL_LockMutex(rendererMutex);
|
||||
SDL_CondSignal(rendererCond);
|
||||
SDL_UnlockMutex(rendererMutex);
|
||||
|
||||
window_setup();
|
||||
|
||||
rendering = 1;
|
||||
while (rendering) {
|
||||
|
||||
if (!window_create())
|
||||
rendering = 0;
|
||||
|
||||
renderer_doreset = 1;
|
||||
internal_rendering = 1;
|
||||
while (rendering && internal_rendering)
|
||||
{
|
||||
if (!render())
|
||||
internal_rendering = 0;
|
||||
|
||||
SDL_Delay(1);
|
||||
}
|
||||
window_close();
|
||||
}
|
||||
|
||||
SDL_LockMutex(rendererMutex);
|
||||
SDL_CondSignal(rendererCond);
|
||||
SDL_UnlockMutex(rendererMutex);
|
||||
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
void* timer = 0;
|
||||
|
||||
void render_timer()
|
||||
{
|
||||
#ifdef PCEM_RENDER_TIMER_LOOP
|
||||
/* For some reason this while-loop works on OSX, which also fixes missing events. No idea why though. */
|
||||
renderer_thread(0);
|
||||
#else
|
||||
if (rendering && !render())
|
||||
{
|
||||
window_close();
|
||||
window_create();
|
||||
renderer_doreset = 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void render_start_timer()
|
||||
{
|
||||
#ifdef PCEM_RENDER_TIMER_LOOP
|
||||
timer = wx_createtimer(render_timer);
|
||||
wx_starttimer(timer, 500, 1);
|
||||
#else
|
||||
window_setup();
|
||||
if (window_create())
|
||||
{
|
||||
rendering = 1;
|
||||
renderer_doreset = 1;
|
||||
wx_starttimer(timer, 1, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void renderer_start()
|
||||
{
|
||||
if (!rendering)
|
||||
{
|
||||
#ifdef PCEM_RENDER_WITH_TIMER
|
||||
render_start_timer();
|
||||
#else
|
||||
SDL_LockMutex(rendererMutex);
|
||||
renderthread = SDL_CreateThread(renderer_thread, "SDL2 Thread", NULL);
|
||||
SDL_CondWait(rendererCond, rendererMutex);
|
||||
SDL_UnlockMutex(rendererMutex);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void renderer_stop(int timeout)
|
||||
{
|
||||
#if defined(PCEM_RENDER_WITH_TIMER) && !defined(PCEM_RENDER_TIMER_LOOP)
|
||||
rendering = 0;
|
||||
window_close();
|
||||
wx_destroytimer(timer);
|
||||
#else
|
||||
if (rendering)
|
||||
{
|
||||
SDL_LockMutex(rendererMutex);
|
||||
rendering = 0;
|
||||
if (timeout)
|
||||
SDL_CondWaitTimeout(rendererCond, rendererMutex, timeout);
|
||||
else
|
||||
SDL_CondWait(rendererCond, rendererMutex);
|
||||
SDL_UnlockMutex(rendererMutex);
|
||||
renderthread = NULL;
|
||||
}
|
||||
if (timer)
|
||||
wx_destroytimer(timer);
|
||||
#endif
|
||||
}
|
||||
|
|
@ -1,13 +1,14 @@
|
|||
#include <SDL2/SDL.h>
|
||||
#include "video.h"
|
||||
#include "wx-sdl2-video.h"
|
||||
#include "wx-utils.h"
|
||||
#include "ibm.h"
|
||||
#include "video.h"
|
||||
#include "wx-display.h"
|
||||
#include "plat-keyboard.h"
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
#define BITMAP WINDOWS_BITMAP
|
||||
#undef UNICODE
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#undef BITMAP
|
||||
|
|
@ -29,6 +30,7 @@ int mousecapture = 0;
|
|||
|
||||
extern int pause;
|
||||
extern int video_scale;
|
||||
extern int take_screenshot;
|
||||
|
||||
void* ghwnd;
|
||||
void* menu;
|
||||
|
|
@ -44,6 +46,7 @@ void renderer_start();
|
|||
void renderer_stop(int timeout);
|
||||
|
||||
int trigger_fullscreen = 0;
|
||||
int trigger_screenshot = 0;
|
||||
int trigger_togglewindow = 0;
|
||||
int trigger_inputrelease = 0;
|
||||
|
||||
|
|
@ -53,27 +56,8 @@ extern void toggle_fullscreen();
|
|||
|
||||
void display_resize(int width, int height)
|
||||
{
|
||||
/* Video scaling-code is borrowed from 86Box */
|
||||
switch(video_scale)
|
||||
{
|
||||
case 0:
|
||||
winsizex = width >> 1;
|
||||
winsizey = height >> 1;
|
||||
break;
|
||||
case 2:
|
||||
winsizex = (width * 3) >> 1;
|
||||
winsizey = (height * 3) >> 1;
|
||||
break;
|
||||
case 3:
|
||||
winsizex = width << 1;
|
||||
winsizey = height << 1;
|
||||
break;
|
||||
case 1:
|
||||
default:
|
||||
winsizex = width;
|
||||
winsizey = height;
|
||||
break;
|
||||
}
|
||||
winsizex = width*(video_scale+1) >> 1;
|
||||
winsizey = height*(video_scale+1) >> 1;
|
||||
|
||||
SDL_Rect rect;
|
||||
rect.x = rect.y = 0;
|
||||
|
|
@ -144,7 +128,7 @@ int is_fullscreen()
|
|||
}
|
||||
|
||||
void sdl_set_window_title(const char* title) {
|
||||
if (window)
|
||||
if (window && !is_fullscreen())
|
||||
SDL_SetWindowTitle(window, title);
|
||||
}
|
||||
|
||||
|
|
@ -258,7 +242,7 @@ static const struct {
|
|||
{ SDL_SCANCODE_KP_1, 0x4f },
|
||||
{ SDL_SCANCODE_KP_2, 0x50 },
|
||||
{ SDL_SCANCODE_KP_3, 0x51 },
|
||||
{ SDL_SCANCODE_KP_4, 0x48 },
|
||||
{ SDL_SCANCODE_KP_4, 0x4b },
|
||||
{ SDL_SCANCODE_KP_5, 0x4c },
|
||||
{ SDL_SCANCODE_KP_6, 0x4d },
|
||||
{ SDL_SCANCODE_KP_7, 0x47 },
|
||||
|
|
@ -365,12 +349,13 @@ LRESULT CALLBACK LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
|
|||
if (!mousecapture)
|
||||
key_state = -key_state;
|
||||
/* if key_state is 0 and modkeystate[c] is negative,
|
||||
an sdl_event should not generated */
|
||||
an sdl_event should not be generated */
|
||||
if (key_state > 0 || modkeystate[c] > 0)
|
||||
{
|
||||
steal = 1;
|
||||
steal = key_state != 0;
|
||||
SDL_Event event;
|
||||
event.key.keysym.scancode = s;
|
||||
event.key.timestamp = p->time;
|
||||
|
||||
event.type = key_state ? SDL_KEYDOWN : SDL_KEYUP;
|
||||
SDL_PushEvent(&event);
|
||||
|
|
@ -389,7 +374,7 @@ int window_create()
|
|||
{
|
||||
window = SDL_CreateWindow("PCem Display",
|
||||
rect.x, rect.y, rect.w, rect.h,
|
||||
vid_resize ? SDL_WINDOW_RESIZABLE : 0);
|
||||
requested_render_driver.sdl_window_params | (vid_resize ? SDL_WINDOW_RESIZABLE : 0));
|
||||
if (!window)
|
||||
{
|
||||
char message[200];
|
||||
|
|
@ -437,6 +422,17 @@ int render()
|
|||
uint64_t start_time = timer_read();
|
||||
uint64_t end_time;
|
||||
|
||||
if (window_dosetresize)
|
||||
{
|
||||
window_dosetresize = 0;
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 5)
|
||||
SDL_GetWindowSize(window, &rect.w, &rect.h);
|
||||
SDL_SetWindowResizable(window, vid_resize);
|
||||
SDL_SetWindowSize(window, rect.w, rect.h);
|
||||
#else
|
||||
window_doreset = 1;
|
||||
#endif
|
||||
}
|
||||
if (window_doreset)
|
||||
{
|
||||
pclog("window_doreset\n");
|
||||
|
|
@ -463,22 +459,22 @@ int render()
|
|||
if (event.button.button == SDL_BUTTON_LEFT && !pause)
|
||||
{
|
||||
window_doinputgrab = 1;
|
||||
if (video_fullscreen) {
|
||||
if (video_fullscreen)
|
||||
window_dofullscreen = 1;
|
||||
}
|
||||
} else if (event.button.button == SDL_BUTTON_RIGHT)
|
||||
{
|
||||
wx_popupmenu(ghwnd, menu, 0, 0);
|
||||
}
|
||||
else if (event.button.button == SDL_BUTTON_RIGHT)
|
||||
wx_popupmenu(ghwnd, menu, 0, 0);
|
||||
|
||||
}
|
||||
else if (event.button.button == SDL_BUTTON_MIDDLE && !is_fullscreen())
|
||||
window_doinputrelease = 1;
|
||||
break;
|
||||
case SDL_MOUSEWHEEL:
|
||||
if (mousecapture) mouse_wheel_update(event.wheel.y);
|
||||
break;
|
||||
case SDL_WINDOWEVENT:
|
||||
if (event.window.event == SDL_WINDOWEVENT_CLOSE) {
|
||||
if (event.window.event == SDL_WINDOWEVENT_CLOSE)
|
||||
wx_stop_emulation(ghwnd);
|
||||
}
|
||||
if (event.window.event == SDL_WINDOWEVENT_FOCUS_LOST)
|
||||
{
|
||||
if (is_fullscreen())
|
||||
|
|
@ -486,14 +482,19 @@ int render()
|
|||
window_doinputrelease = 1;
|
||||
}
|
||||
|
||||
if (window_remember) {
|
||||
if (window_remember)
|
||||
{
|
||||
int flags = SDL_GetWindowFlags(window);
|
||||
if (!(flags&SDL_WINDOW_FULLSCREEN) && !(flags&SDL_WINDOW_FULLSCREEN_DESKTOP)) {
|
||||
if (event.window.event == SDL_WINDOWEVENT_MOVED) {
|
||||
get_border_size(&border_x, &border_y, 0, 0);
|
||||
if (!(flags&SDL_WINDOW_FULLSCREEN) && !(flags&SDL_WINDOW_FULLSCREEN_DESKTOP))
|
||||
{
|
||||
if (event.window.event == SDL_WINDOWEVENT_MOVED)
|
||||
{
|
||||
get_border_size(&border_y, &border_x, 0, 0);
|
||||
window_x = event.window.data1-border_x;
|
||||
window_y = event.window.data2-border_y;
|
||||
} else if (event.window.event == SDL_WINDOWEVENT_RESIZED) {
|
||||
}
|
||||
else if (event.window.event == SDL_WINDOWEVENT_RESIZED)
|
||||
{
|
||||
window_w = event.window.data1;
|
||||
window_h = event.window.data2;
|
||||
}
|
||||
|
|
@ -513,7 +514,7 @@ int render()
|
|||
#endif
|
||||
int key_idx = sdl_scancode(event.key.keysym.scancode);
|
||||
if (key_idx != -1)
|
||||
rawinputkey[key_idx] = 1;
|
||||
rawinputkey[key_idx] = event.key.timestamp;
|
||||
break;
|
||||
}
|
||||
case SDL_KEYUP:
|
||||
|
|
@ -534,15 +535,15 @@ int render()
|
|||
trigger_fullscreen = 0;
|
||||
toggle_fullscreen();
|
||||
}
|
||||
// if (event.key.keysym.scancode == SDL_SCANCODE_PAGEUP &&
|
||||
// (rawinputkey[sdl_scancode(SDL_SCANCODE_LCTRL)] || rawinputkey[sdl_scancode(SDL_SCANCODE_RCTRL)]) &&
|
||||
// (rawinputkey[sdl_scancode(SDL_SCANCODE_LALT)] || rawinputkey[sdl_scancode(SDL_SCANCODE_RALT)]))
|
||||
// trigger_togglewindow = 1;
|
||||
// else if (trigger_togglewindow)
|
||||
// {
|
||||
// trigger_togglewindow = 0;
|
||||
// wx_togglewindow(ghwnd);
|
||||
// }
|
||||
else if (rawinputkey[sdl_scancode(SDL_SCANCODE_PAGEUP)] &&
|
||||
(rawinputkey[sdl_scancode(SDL_SCANCODE_LCTRL)] || rawinputkey[sdl_scancode(SDL_SCANCODE_RCTRL)]) &&
|
||||
(rawinputkey[sdl_scancode(SDL_SCANCODE_LALT)] || rawinputkey[sdl_scancode(SDL_SCANCODE_RALT)]))
|
||||
trigger_screenshot = 1;
|
||||
else if (trigger_screenshot)
|
||||
{
|
||||
trigger_screenshot = 0;
|
||||
take_screenshot = 1;
|
||||
}
|
||||
else if (event.key.keysym.scancode == SDL_SCANCODE_END &&
|
||||
(rawinputkey[sdl_scancode(SDL_SCANCODE_LCTRL)] || rawinputkey[sdl_scancode(SDL_SCANCODE_RCTRL)]))
|
||||
trigger_inputrelease = 1;
|
||||
|
|
@ -552,7 +553,8 @@ int render()
|
|||
if (!is_fullscreen())
|
||||
window_doinputrelease = 1;
|
||||
}
|
||||
if (window_doremember) {
|
||||
if (window_doremember)
|
||||
{
|
||||
window_doremember = 0;
|
||||
SDL_GetWindowPosition(window, &window_x, &window_y);
|
||||
SDL_GetWindowSize(window, &window_w, &window_h);
|
||||
|
|
|
|||
92
src/wx-sdl2-glw.h
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
#ifndef SRC_WX_SDL2_GLW_H_
|
||||
#define SRC_WX_SDL2_GLW_H_
|
||||
|
||||
typedef struct glw_t {
|
||||
PFNGLACTIVETEXTUREPROC glActiveTexture;
|
||||
PFNGLCREATESHADERPROC glCreateShader;
|
||||
PFNGLSHADERSOURCEPROC glShaderSource;
|
||||
PFNGLCOMPILESHADERPROC glCompileShader;
|
||||
PFNGLGETSHADERIVPROC glGetShaderiv;
|
||||
PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog;
|
||||
PFNGLCREATEPROGRAMPROC glCreateProgram;
|
||||
PFNGLATTACHSHADERPROC glAttachShader;
|
||||
PFNGLLINKPROGRAMPROC glLinkProgram;
|
||||
PFNGLGETPROGRAMIVPROC glGetProgramiv;
|
||||
PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog;
|
||||
PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation;
|
||||
PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation;
|
||||
PFNGLUSEPROGRAMPROC glUseProgram;
|
||||
PFNGLGENERATEMIPMAPPROC glGenerateMipmap;
|
||||
PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers;
|
||||
PFNGLDELETESHADERPROC glDeleteShader;
|
||||
PFNGLDELETEPROGRAMPROC glDeleteProgram;
|
||||
PFNGLDELETEBUFFERSPROC glDeleteBuffers;
|
||||
PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays;
|
||||
PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers;
|
||||
PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer;
|
||||
PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D;
|
||||
PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus;
|
||||
PFNGLGENVERTEXARRAYSPROC glGenVertexArrays;
|
||||
PFNGLBINDVERTEXARRAYPROC glBindVertexArray;
|
||||
PFNGLGENBUFFERSPROC glGenBuffers;
|
||||
PFNGLBINDBUFFERPROC glBindBuffer;
|
||||
PFNGLBUFFERDATAPROC glBufferData;
|
||||
PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer;
|
||||
PFNGLUNIFORM1IPROC glUniform1i;
|
||||
PFNGLUNIFORM1FPROC glUniform1f;
|
||||
PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray;
|
||||
PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv;
|
||||
PFNGLUNIFORM2FVPROC glUniform2fv;
|
||||
PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray;
|
||||
PFNGLBUFFERSUBDATAPROC glBufferSubData;
|
||||
} glw_t;
|
||||
|
||||
glw_t* glw_init()
|
||||
{
|
||||
glw_t* glw = malloc(sizeof(glw_t));
|
||||
glw->glActiveTexture = SDL_GL_GetProcAddress("glActiveTexture");
|
||||
glw->glCreateShader = SDL_GL_GetProcAddress("glCreateShader");
|
||||
glw->glShaderSource = SDL_GL_GetProcAddress("glShaderSource");
|
||||
glw->glCompileShader = SDL_GL_GetProcAddress("glCompileShader");
|
||||
glw->glGetShaderiv = SDL_GL_GetProcAddress("glGetShaderiv");
|
||||
glw->glGetShaderInfoLog = SDL_GL_GetProcAddress("glGetShaderInfoLog");
|
||||
glw->glCreateProgram = SDL_GL_GetProcAddress("glCreateProgram");
|
||||
glw->glAttachShader = SDL_GL_GetProcAddress("glAttachShader");
|
||||
glw->glLinkProgram = SDL_GL_GetProcAddress("glLinkProgram");
|
||||
glw->glGetProgramiv = SDL_GL_GetProcAddress("glGetProgramiv");
|
||||
glw->glGetProgramInfoLog = SDL_GL_GetProcAddress("glGetProgramInfoLog");
|
||||
glw->glGetUniformLocation = SDL_GL_GetProcAddress("glGetUniformLocation");
|
||||
glw->glGetAttribLocation = SDL_GL_GetProcAddress("glGetAttribLocation");
|
||||
glw->glUseProgram = SDL_GL_GetProcAddress("glUseProgram");
|
||||
glw->glGenerateMipmap = SDL_GL_GetProcAddress("glGenerateMipmap");
|
||||
glw->glDeleteFramebuffers = SDL_GL_GetProcAddress("glDeleteFramebuffers");
|
||||
glw->glDeleteShader = SDL_GL_GetProcAddress("glDeleteShader");
|
||||
glw->glDeleteProgram = SDL_GL_GetProcAddress("glDeleteProgram");
|
||||
glw->glDeleteBuffers = SDL_GL_GetProcAddress("glDeleteBuffers");
|
||||
glw->glDeleteVertexArrays = SDL_GL_GetProcAddress("glDeleteVertexArrays");
|
||||
glw->glGenFramebuffers = SDL_GL_GetProcAddress("glGenFramebuffers");
|
||||
glw->glBindFramebuffer = SDL_GL_GetProcAddress("glBindFramebuffer");
|
||||
glw->glFramebufferTexture2D = SDL_GL_GetProcAddress("glFramebufferTexture2D");
|
||||
glw->glCheckFramebufferStatus = SDL_GL_GetProcAddress("glCheckFramebufferStatus");
|
||||
glw->glGenVertexArrays = SDL_GL_GetProcAddress("glGenVertexArrays");
|
||||
glw->glBindVertexArray = SDL_GL_GetProcAddress("glBindVertexArray");
|
||||
glw->glGenBuffers = SDL_GL_GetProcAddress("glGenBuffers");
|
||||
glw->glBindBuffer = SDL_GL_GetProcAddress("glBindBuffer");
|
||||
glw->glBufferData = SDL_GL_GetProcAddress("glBufferData");
|
||||
glw->glVertexAttribPointer = SDL_GL_GetProcAddress("glVertexAttribPointer");
|
||||
glw->glUniform1i = SDL_GL_GetProcAddress("glUniform1i");
|
||||
glw->glUniform1f = SDL_GL_GetProcAddress("glUniform1f");
|
||||
glw->glEnableVertexAttribArray = SDL_GL_GetProcAddress("glEnableVertexAttribArray");
|
||||
glw->glUniformMatrix4fv = SDL_GL_GetProcAddress("glUniformMatrix4fv");
|
||||
glw->glUniform2fv = SDL_GL_GetProcAddress("glUniform2fv");
|
||||
glw->glDisableVertexAttribArray = SDL_GL_GetProcAddress("glDisableVertexAttribArray");
|
||||
glw->glBufferSubData = SDL_GL_GetProcAddress("glBufferSubData");
|
||||
return glw;
|
||||
}
|
||||
|
||||
void glw_free(glw_t* glw)
|
||||
{
|
||||
free(glw);
|
||||
}
|
||||
|
||||
#endif /* SRC_WX_SDL2_GLW_H_ */
|
||||
|
|
@ -1,961 +0,0 @@
|
|||
#include "wx-utils.h"
|
||||
#include "wx-sdl2.h"
|
||||
|
||||
#include "ibm.h"
|
||||
#include "ide.h"
|
||||
#include "hdd.h"
|
||||
|
||||
static struct
|
||||
{
|
||||
int cylinders;
|
||||
int heads;
|
||||
} hd_types[] =
|
||||
{
|
||||
{306, 4}, {615, 4}, {615, 6}, {940, 8},
|
||||
{940, 6}, {615, 4}, {462, 8}, {733, 5},
|
||||
{900, 15}, {820, 3}, {855, 5}, {855, 7},
|
||||
{306, 8}, {733, 7}, {0, 0}, {612, 4},
|
||||
{977, 5}, {977, 7}, {1024, 7}, {733, 5},
|
||||
{733, 7}, {733, 5}, {306, 4}, {925, 7},
|
||||
{925, 9}, {754, 7}, {754, 11}, {699, 7},
|
||||
{823, 10}, {918, 7}, {1024, 11}, {1024, 15},
|
||||
{1024, 5}, {612, 2}, {1024, 9}, {1024, 8},
|
||||
{615, 8}, {987, 3}, {462, 7}, {820, 6},
|
||||
{977, 5}, {981, 5}, {830, 7}, {830, 10},
|
||||
{917, 15}, {1224, 15}
|
||||
};
|
||||
|
||||
static int hd_changed = 0;
|
||||
|
||||
static char hd_new_name[512];
|
||||
static int hd_new_spt, hd_new_hpc, hd_new_cyl;
|
||||
static int hd_new_type;
|
||||
static int new_cdrom_channel;
|
||||
|
||||
extern int pause;
|
||||
|
||||
static void check_hd_type(off64_t sz)
|
||||
{
|
||||
int c;
|
||||
|
||||
hd_new_type = 0;
|
||||
|
||||
if (hdd_controller_current_is_mfm())
|
||||
{
|
||||
for (c = 0; c < 46; c++)
|
||||
{
|
||||
if ((hd_types[c].cylinders * hd_types[c].heads * 17 * 512) == sz)
|
||||
{
|
||||
hd_new_spt = 17;
|
||||
hd_new_hpc = hd_types[c].heads;
|
||||
hd_new_cyl = hd_types[c].cylinders;
|
||||
hd_new_type = c+1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
hd_new_spt = 63;
|
||||
hd_new_hpc = 16;
|
||||
hd_new_cyl = ((sz / 512) / 16) / 63;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((sz % 17) == 0 && sz <= 133693440)
|
||||
{
|
||||
hd_new_spt = 17;
|
||||
|
||||
if (sz <= 26738688)
|
||||
hd_new_hpc = 4;
|
||||
else if ((sz % 3072) == 0 && sz <= 53477376)
|
||||
hd_new_hpc = 6;
|
||||
else
|
||||
{
|
||||
for (c=5;c<16;c++)
|
||||
{
|
||||
if((sz % (c * 512)) == 0 && sz <= 1024*c*17*512) break;
|
||||
if (c == 5) c++;
|
||||
}
|
||||
hd_new_hpc = c;
|
||||
}
|
||||
|
||||
hd_new_cyl = (int)((sz / 512) / hd_new_hpc) / 17;
|
||||
}
|
||||
else
|
||||
{
|
||||
hd_new_spt = 63;
|
||||
hd_new_hpc = 16;
|
||||
hd_new_cyl = ((sz / 512) / 16) / 63;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define ID_IS(s) wParam == wx_xrcid(s)
|
||||
#define ID_RANGE(a, b) wParam >= wx_xrcid(a) && wParam <= wx_xrcid(b)
|
||||
|
||||
static void update_hdd_cdrom(void* hdlg)
|
||||
{
|
||||
void* h;
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_HDD[0]"));
|
||||
wx_sendmessage(h, WX_BM_SETCHECK, (new_cdrom_channel == 0) ? 0 : 1, 0);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_CDROM[0]"));
|
||||
wx_sendmessage(h, WX_BM_SETCHECK, (new_cdrom_channel == 0) ? 1 : 0, 0);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_HDD[1]"));
|
||||
wx_sendmessage(h, WX_BM_SETCHECK, (new_cdrom_channel == 1) ? 0 : 1, 0);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_CDROM[1]"));
|
||||
wx_sendmessage(h, WX_BM_SETCHECK, (new_cdrom_channel == 1) ? 1 : 0, 0);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_HDD[2]"));
|
||||
wx_sendmessage(h, WX_BM_SETCHECK, (new_cdrom_channel == 2) ? 0 : 1, 0);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_CDROM[2]"));
|
||||
wx_sendmessage(h, WX_BM_SETCHECK, (new_cdrom_channel == 2) ? 1 : 0, 0);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_HDD[3]"));
|
||||
wx_sendmessage(h, WX_BM_SETCHECK, (new_cdrom_channel == 3) ? 0 : 1, 0);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_CDROM[3]"));
|
||||
wx_sendmessage(h, WX_BM_SETCHECK, (new_cdrom_channel == 3) ? 1 : 0, 0);
|
||||
}
|
||||
|
||||
static int hdnew_dlgproc(void* hdlg, int message, INT_PARAM wParam, LONG_PARAM lParam)
|
||||
{
|
||||
char s[260];
|
||||
void* h;
|
||||
int c;
|
||||
PcemHDC hd[4];
|
||||
FILE *f;
|
||||
uint8_t buf[512];
|
||||
int hd_type;
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case WX_INITDIALOG:
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT1"));
|
||||
sprintf(s, "%i", 63);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT2"));
|
||||
sprintf(s, "%i", 16);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT3"));
|
||||
sprintf(s, "%i", 511);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDITC"));
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)"");
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_TEXT1"));
|
||||
sprintf(s, "Size : %imb", (((511*16*63)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
|
||||
// hd_type = 0;
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_HDTYPE"));
|
||||
wx_sendmessage(h, WX_CB_ADDSTRING, 0, (LONG_PARAM)"Custom type");
|
||||
for (c = 1; c <= 46; c++)
|
||||
{
|
||||
sprintf(s, "Type %02i : cylinders=%i, heads=%i, size=%iMB", c, hd_types[c-1].cylinders, hd_types[c-1].heads, (hd_types[c-1].cylinders * hd_types[c-1].heads * 17 * 512) / (1024 * 1024));
|
||||
wx_sendmessage(h, WX_CB_ADDSTRING, 0, (LONG_PARAM)s);
|
||||
}
|
||||
wx_sendmessage(h, WX_CB_SETCURSEL, 0, 0);
|
||||
|
||||
return TRUE;
|
||||
case WX_COMMAND:
|
||||
if (wParam == wxID_OK) {
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDITC"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 511, (LONG_PARAM)hd_new_name);
|
||||
if (!hd_new_name[0])
|
||||
{
|
||||
wx_messagebox(NULL,"Please enter a valid filename","PCem error",WX_MB_OK);
|
||||
return TRUE;
|
||||
}
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT1"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd_new_spt);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT2"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd_new_hpc);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT3"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd_new_cyl);
|
||||
|
||||
if (hd_new_spt > 63)
|
||||
{
|
||||
wx_messagebox(NULL, "Drive has too many sectors (maximum is 63)", "PCem error", WX_MB_OK);
|
||||
return TRUE;
|
||||
}
|
||||
if (hd_new_hpc > 16)
|
||||
{
|
||||
wx_messagebox(NULL, "Drive has too many heads (maximum is 16)", "PCem error", WX_MB_OK);
|
||||
return TRUE;
|
||||
}
|
||||
if (hd_new_cyl > 16383)
|
||||
{
|
||||
wx_messagebox(NULL, "Drive has too many cylinders (maximum is 16383)", "PCem error", WX_MB_OK);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
f = fopen64(hd_new_name, "wb");
|
||||
if (!f)
|
||||
{
|
||||
wx_messagebox(NULL, "Can't open file for write", "PCem error", WX_MB_OK);
|
||||
return TRUE;
|
||||
}
|
||||
memset(buf, 0, 512);
|
||||
for (c = 0; c < (hd_new_cyl * hd_new_hpc * hd_new_spt); c++)
|
||||
fwrite(buf, 512, 1, f);
|
||||
fclose(f);
|
||||
|
||||
wx_messagebox(NULL, "Remember to partition and format the new drive", "PCem", WX_MB_OK);
|
||||
|
||||
wx_enddialog(hdlg, 1);
|
||||
return TRUE;
|
||||
} else if (wParam == wxID_CANCEL) {
|
||||
wx_enddialog(hdlg, 0);
|
||||
return TRUE;
|
||||
} else if (ID_IS("IDC_CFILE")) {
|
||||
if (!getsfile(hdlg, "Hard disc image (*.img)|*.img|All files (*.*)|*.*", "", NULL, "img"))
|
||||
{
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDITC"));
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM) openfilestring);
|
||||
}
|
||||
return TRUE;
|
||||
} else if (ID_IS("IDC_EDIT1") || ID_IS("IDC_EDIT2") || ID_IS("IDC_EDIT3")) {
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT1"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
pclog("EDIT1: %s\n", s);
|
||||
sscanf(s, "%i", &hd[0].spt);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT2"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
pclog("EDIT2: %s\n", s);
|
||||
sscanf(s, "%i", &hd[0].hpc);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT3"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
pclog("EDIT3: %s\n", s);
|
||||
sscanf(s, "%i", &hd[0].tracks);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_TEXT1"));
|
||||
sprintf(s, "Size : %imb", (int)(((((uint64_t)hd[0].tracks*(uint64_t)hd[0].hpc)*(uint64_t)hd[0].spt)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
|
||||
hd_type = 0;
|
||||
for (c = 1; c <= 46; c++)
|
||||
{
|
||||
pclog("Compare %i,%i %i,%i %i,%i\n", hd[0].spt,17, hd[0].hpc,hd_types[c-1].heads, hd[0].tracks,hd_types[c-1].cylinders);
|
||||
if (hd[0].spt == 17 && hd[0].hpc == hd_types[c-1].heads && hd[0].tracks == hd_types[c-1].cylinders)
|
||||
{
|
||||
hd_type = c;
|
||||
break;
|
||||
}
|
||||
}
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_HDTYPE"));
|
||||
wx_sendmessage(h, WX_CB_SETCURSEL, hd_type, 0);
|
||||
|
||||
return TRUE;
|
||||
} else if (ID_IS("IDC_HDTYPE")) {
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_HDTYPE"));
|
||||
hd_type = wx_sendmessage(h, WX_CB_GETCURSEL, 0, 0);
|
||||
if (hd_type)
|
||||
{
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT3"));
|
||||
sprintf(s, "%i", hd_types[hd_type-1].cylinders);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT2"));
|
||||
sprintf(s, "%i", hd_types[hd_type-1].heads);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT1"));
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)"17");
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_TEXT1"));
|
||||
sprintf(s, "Size : %imb", (int)(((uint64_t)hd_types[hd_type-1].cylinders*hd_types[hd_type-1].heads*17*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int hdsize_dlgproc(void* hdlg, int message, INT_PARAM wParam, LONG_PARAM lParam)
|
||||
{
|
||||
char s[260];
|
||||
void* h;
|
||||
PcemHDC hd[2];
|
||||
int c;
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case WX_INITDIALOG:
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_HDTYPE"));
|
||||
wx_sendmessage(h, WX_CB_ADDSTRING, 0, (LONG_PARAM)"Custom type");
|
||||
for (c = 1; c <= 46; c++)
|
||||
{
|
||||
sprintf(s, "Type %02i : cylinders=%i, heads=%i, size=%iMB", c, hd_types[c-1].cylinders, hd_types[c-1].heads, (hd_types[c-1].cylinders * hd_types[c-1].heads * 17 * 512) / (1024 * 1024));
|
||||
wx_sendmessage(h, WX_CB_ADDSTRING, 0, (LONG_PARAM)s);
|
||||
}
|
||||
wx_sendmessage(h, WX_CB_SETCURSEL, hd_new_type, 0);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT1"));
|
||||
sprintf(s, "%i", hd_new_spt);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT2"));
|
||||
sprintf(s, "%i", hd_new_hpc);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT3"));
|
||||
sprintf(s, "%i", hd_new_cyl);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_TEXT1"));
|
||||
sprintf(s, "Size : %imb", (int)((((uint64_t)hd_new_spt*(uint64_t)hd_new_hpc*(uint64_t)hd_new_cyl)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
|
||||
return TRUE;
|
||||
case WX_COMMAND:
|
||||
if (wParam == wxID_OK) {
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT1"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd_new_spt);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT2"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd_new_hpc);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT3"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd_new_cyl);
|
||||
|
||||
if (hd_new_spt > 63)
|
||||
{
|
||||
wx_messagebox(NULL,"Drive has too many sectors (maximum is 63)","PCem error",WX_MB_OK);
|
||||
return TRUE;
|
||||
}
|
||||
if (hd_new_hpc > 16)
|
||||
{
|
||||
wx_messagebox(NULL,"Drive has too many heads (maximum is 16)","PCem error",WX_MB_OK);
|
||||
return TRUE;
|
||||
}
|
||||
if (hd_new_cyl > 16383)
|
||||
{
|
||||
wx_messagebox(NULL,"Drive has too many cylinders (maximum is 16383)","PCem error",WX_MB_OK);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
wx_enddialog(hdlg,1);
|
||||
return TRUE;
|
||||
} else if (wParam == wxID_CANCEL) {
|
||||
wx_enddialog(hdlg,0);
|
||||
return TRUE;
|
||||
} else if (ID_IS("IDC_EDIT1") || ID_IS("IDC_EDIT2") || ID_IS("IDC_EDIT3")) {
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT1"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[0].spt);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT2"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[0].hpc);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT3"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[0].tracks);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_TEXT1"));
|
||||
sprintf(s, "Size : %imb", (int)(((((uint64_t)hd[0].tracks*(uint64_t)hd[0].hpc)*(uint64_t)hd[0].spt)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int hdconf_dlgproc(void* hdlg, int message, INT_PARAM wParam, LONG_PARAM lParam)
|
||||
{
|
||||
char s[260];
|
||||
void* h;
|
||||
PcemHDC hd[4];
|
||||
FILE *f;
|
||||
off64_t sz;
|
||||
switch (message)
|
||||
{
|
||||
case WX_INITDIALOG:
|
||||
pause = 1;
|
||||
hd[0] = hdc[0];
|
||||
hd[1] = hdc[1];
|
||||
hd[2] = hdc[2];
|
||||
hd[3] = hdc[3];
|
||||
hd_changed = 0;
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[0]"));
|
||||
sprintf(s, "%i", hdc[0].spt);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[0]"));
|
||||
sprintf(s, "%i", hdc[0].hpc);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[0]"));
|
||||
sprintf(s, "%i", hdc[0].tracks);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_FN[0]"));
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)ide_fn[0]);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[1]"));
|
||||
sprintf(s, "%i", hdc[1].spt);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[1]"));
|
||||
sprintf(s, "%i", hdc[1].hpc);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[1]"));
|
||||
sprintf(s, "%i", hdc[1].tracks);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h= wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_FN[1]"));
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)ide_fn[1]);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[2]"));
|
||||
sprintf(s, "%i", hdc[2].spt);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[2]"));
|
||||
sprintf(s, "%i", hdc[2].hpc);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[2]"));
|
||||
sprintf(s, "%i", hdc[2].tracks);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h= wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_FN[2]"));
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)ide_fn[2]);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[3]"));
|
||||
sprintf(s, "%i", hdc[3].spt);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[3]"));
|
||||
sprintf(s, "%i", hdc[3].hpc);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[3]"));
|
||||
sprintf(s, "%i", hdc[3].tracks);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h= wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_FN[3]"));
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)ide_fn[3]);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_TEXT_SIZE[0]"));
|
||||
sprintf(s, "Size : %imb", (int)(((((uint64_t)hd[0].tracks*(uint64_t)hd[0].hpc)*(uint64_t)hd[0].spt)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_TEXT_SIZE[1]"));
|
||||
sprintf(s, "Size : %imb", (int)(((((uint64_t)hd[1].tracks*(uint64_t)hd[1].hpc)*(uint64_t)hd[1].spt)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_TEXT_SIZE[2]"));
|
||||
sprintf(s, "Size : %imb", (int)(((((uint64_t)hd[2].tracks*(uint64_t)hd[2].hpc)*(uint64_t)hd[2].spt)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_TEXT_SIZE[3]"));
|
||||
sprintf(s, "Size : %imb", (int)(((((uint64_t)hd[3].tracks*(uint64_t)hd[3].hpc)*(uint64_t)hd[3].spt)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
|
||||
new_cdrom_channel = cdrom_channel;
|
||||
|
||||
update_hdd_cdrom(hdlg);
|
||||
|
||||
if (hdd_controller_current_is_mfm()) {
|
||||
wx_enablewindow(wx_getdlgitem(hdlg, WX_ID("IDC_PANEL[2]")), 0);
|
||||
wx_enablewindow(wx_getdlgitem(hdlg, WX_ID("IDC_PANEL[3]")), 0);
|
||||
wx_enablewindow(wx_getdlgitem(hdlg, WX_ID("IDC_HDD[0]")), 0);
|
||||
wx_enablewindow(wx_getdlgitem(hdlg, WX_ID("IDC_HDD[1]")), 0);
|
||||
wx_enablewindow(wx_getdlgitem(hdlg, WX_ID("IDC_CDROM[0]")), 0);
|
||||
wx_enablewindow(wx_getdlgitem(hdlg, WX_ID("IDC_CDROM[1]")), 0);
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
case WX_COMMAND:
|
||||
if (wParam == wxID_OK)
|
||||
{
|
||||
if (hd_changed || cdrom_channel != new_cdrom_channel)
|
||||
{
|
||||
if (!has_been_inited || confirm())
|
||||
{
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[0]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[0].spt);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[0]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[0].hpc);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[0]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[0].tracks);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_FN[0]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 511, (LONG_PARAM)ide_fn[0]);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[1]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[1].spt);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[1]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[1].hpc);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[1]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[1].tracks);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_FN[1]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 511, (LONG_PARAM)ide_fn[1]);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[2]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[2].spt);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[2]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[2].hpc);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[2]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[2].tracks);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_FN[2]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 511, (LONG_PARAM)ide_fn[2]);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[3]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[3].spt);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[3]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[3].hpc);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[3]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[3].tracks);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_FN[3]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 511, (LONG_PARAM)ide_fn[3]);
|
||||
|
||||
hdc[0] = hd[0];
|
||||
hdc[1] = hd[1];
|
||||
hdc[2] = hd[2];
|
||||
hdc[3] = hd[3];
|
||||
|
||||
cdrom_channel = new_cdrom_channel;
|
||||
|
||||
if (has_been_inited)
|
||||
{
|
||||
saveconfig(NULL);
|
||||
|
||||
resetpchard();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (wParam == wxID_OK || wParam == wxID_CANCEL)
|
||||
{
|
||||
wx_enddialog(hdlg, 0);
|
||||
pause = 0;
|
||||
return TRUE;
|
||||
} else if (ID_IS("IDC_EJECT[0]"))
|
||||
{
|
||||
hd[0].spt = 0;
|
||||
hd[0].hpc = 0;
|
||||
hd[0].tracks = 0;
|
||||
ide_fn[0][0] = 0;
|
||||
wx_setdlgitemtext(hdlg, WX_ID("IDC_EDIT_SPT[0]"), "0");
|
||||
wx_setdlgitemtext(hdlg, WX_ID("IDC_EDIT_HPC[0]"), "0");
|
||||
wx_setdlgitemtext(hdlg, WX_ID("IDC_EDIT_CYL[0]"), "0");
|
||||
wx_setdlgitemtext(hdlg, WX_ID("IDC_EDIT_FN[0]"), "");
|
||||
hd_changed = 1;
|
||||
return TRUE;
|
||||
} else if (ID_IS("IDC_EJECT[1]"))
|
||||
{
|
||||
hd[1].spt = 0;
|
||||
hd[1].hpc = 0;
|
||||
hd[1].tracks = 0;
|
||||
ide_fn[1][0] = 0;
|
||||
wx_setdlgitemtext(hdlg, WX_ID("IDC_EDIT_SPT[1]"), "0");
|
||||
wx_setdlgitemtext(hdlg, WX_ID("IDC_EDIT_HPC[1]"), "0");
|
||||
wx_setdlgitemtext(hdlg, WX_ID("IDC_EDIT_CYL[1]"), "0");
|
||||
wx_setdlgitemtext(hdlg, WX_ID("IDC_EDIT_FN[1]"), "");
|
||||
hd_changed = 1;
|
||||
return TRUE;
|
||||
} else if (ID_IS("IDC_EJECT[2]"))
|
||||
{
|
||||
hd[2].spt = 0;
|
||||
hd[2].hpc = 0;
|
||||
hd[2].tracks = 0;
|
||||
ide_fn[2][0] = 0;
|
||||
wx_setdlgitemtext(hdlg, WX_ID("IDC_EDIT_SPT[2]"), "0");
|
||||
wx_setdlgitemtext(hdlg, WX_ID("IDC_EDIT_HPC[2]"), "0");
|
||||
wx_setdlgitemtext(hdlg, WX_ID("IDC_EDIT_CYL[2]"), "0");
|
||||
wx_setdlgitemtext(hdlg, WX_ID("IDC_EDIT_FN[2]"), "");
|
||||
hd_changed = 1;
|
||||
return TRUE;
|
||||
} else if (ID_IS("IDC_EJECT[3]"))
|
||||
{
|
||||
hd[3].spt = 0;
|
||||
hd[3].hpc = 0;
|
||||
hd[3].tracks = 0;
|
||||
ide_fn[3][0] = 0;
|
||||
wx_setdlgitemtext(hdlg, WX_ID("IDC_EDIT_SPT[3]"), "0");
|
||||
wx_setdlgitemtext(hdlg, WX_ID("IDC_EDIT_HPC[3]"), "0");
|
||||
wx_setdlgitemtext(hdlg, WX_ID("IDC_EDIT_CYL[3]"), "0");
|
||||
wx_setdlgitemtext(hdlg, WX_ID("IDC_EDIT_FN[3]"), "");
|
||||
hd_changed = 1;
|
||||
return TRUE;
|
||||
}
|
||||
else if (ID_IS("IDC_NEW[0]"))
|
||||
{
|
||||
if (wx_dialogbox(hdlg, "HdNewDlg", hdnew_dlgproc) == 1)
|
||||
{
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[0]"));
|
||||
sprintf(s, "%i", hd_new_spt);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[0]"));
|
||||
sprintf(s, "%i", hd_new_hpc);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[0]"));
|
||||
sprintf(s, "%i", hd_new_cyl);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_FN[0]"));
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)hd_new_name);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_TEXT_SIZE[0]"));
|
||||
sprintf(s, "Size : %imb", (int)(((((uint64_t)hd_new_cyl*(uint64_t)hd_new_hpc)*(uint64_t)hd_new_spt)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
|
||||
hd_changed = 1;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
else if (ID_IS("IDC_FILE[0]"))
|
||||
{
|
||||
if (!getfile(hdlg, "Hard disc image (*.img)|*.img|All files (*.*)|*.*", ""))
|
||||
{
|
||||
f = fopen64(openfilestring, "rb");
|
||||
if (!f)
|
||||
{
|
||||
wx_messagebox(NULL,"Can't open file for read","PCem error",WX_MB_OK);
|
||||
return TRUE;
|
||||
}
|
||||
fseeko64(f, -1, SEEK_END);
|
||||
sz = ftello64(f) + 1;
|
||||
fclose(f);
|
||||
check_hd_type(sz);
|
||||
|
||||
if (wx_dialogbox(hdlg, "HdSizeDlg", hdsize_dlgproc) == 1)
|
||||
{
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[0]"));
|
||||
sprintf(s, "%i", hd_new_spt);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[0]"));
|
||||
sprintf(s, "%i", hd_new_hpc);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[0]"));
|
||||
sprintf(s, "%i", hd_new_cyl);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_FN[0]"));
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)openfilestring);
|
||||
|
||||
h= wx_getdlgitem(hdlg, WX_ID("IDC_TEXT_SIZE[0]"));
|
||||
sprintf(s, "Size : %imb", (int)(((((uint64_t)hd_new_cyl*(uint64_t)hd_new_hpc)*(uint64_t)hd_new_spt)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
|
||||
hd_changed = 1;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
}
|
||||
else if (ID_IS("IDC_NEW[1]"))
|
||||
{
|
||||
if (wx_dialogbox(hdlg, "HdNewDlg", hdnew_dlgproc) == 1)
|
||||
{
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[1]"));
|
||||
sprintf(s, "%i", hd_new_spt);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[1]"));
|
||||
sprintf(s, "%i", hd_new_hpc);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[1]"));
|
||||
sprintf(s, "%i", hd_new_cyl);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_FN[1]"));
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)hd_new_name);
|
||||
|
||||
h= wx_getdlgitem(hdlg, WX_ID("IDC_TEXT_SIZE[1]"));
|
||||
sprintf(s, "Size : %imb", (int)(((((uint64_t)hd_new_cyl*(uint64_t)hd_new_hpc)*(uint64_t)hd_new_spt)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
|
||||
hd_changed = 1;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
else if (ID_IS("IDC_FILE[1]"))
|
||||
{
|
||||
if (!getfile(hdlg, "Hard disc image (*.img)|*.img|All files (*.*)|*.*", ""))
|
||||
{
|
||||
f = fopen64(openfilestring, "rb");
|
||||
if (!f)
|
||||
{
|
||||
wx_messagebox(NULL,"Can't open file for read","PCem error",WX_MB_OK);
|
||||
return TRUE;
|
||||
}
|
||||
fseeko64(f, -1, SEEK_END);
|
||||
sz = ftello64(f) + 1;
|
||||
fclose(f);
|
||||
check_hd_type(sz);
|
||||
|
||||
if (wx_dialogbox(hdlg, "HdSizeDlg", hdsize_dlgproc) == 1)
|
||||
{
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[1]"));
|
||||
sprintf(s, "%i", hd_new_spt);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[1]"));
|
||||
sprintf(s, "%i", hd_new_hpc);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[1]"));
|
||||
sprintf(s, "%i", hd_new_cyl);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_FN[1]"));
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)openfilestring);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_TEXT_SIZE[1]"));
|
||||
sprintf(s, "Size : %imb", (int)(((((uint64_t)hd_new_cyl*(uint64_t)hd_new_hpc)*(uint64_t)hd_new_spt)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
|
||||
hd_changed = 1;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
else if (ID_IS("IDC_NEW[2]"))
|
||||
{
|
||||
if (wx_dialogbox(hdlg, "HdNewDlg", hdnew_dlgproc) == 1)
|
||||
{
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[2]"));
|
||||
sprintf(s, "%i", hd_new_spt);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[2]"));
|
||||
sprintf(s, "%i", hd_new_hpc);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[2]"));
|
||||
sprintf(s, "%i", hd_new_cyl);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_FN[2]"));
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)hd_new_name);
|
||||
|
||||
h= wx_getdlgitem(hdlg, WX_ID("IDC_TEXT_SIZE[2]"));
|
||||
sprintf(s, "Size : %imb", (int)(((((uint64_t)hd_new_cyl*(uint64_t)hd_new_hpc)*(uint64_t)hd_new_spt)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
|
||||
hd_changed = 1;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
else if (ID_IS("IDC_FILE[2]"))
|
||||
{
|
||||
if (!getfile(hdlg, "Hard disc image (*.img)|*.img|All files (*.*)|*.*", ""))
|
||||
{
|
||||
f = fopen64(openfilestring, "rb");
|
||||
if (!f)
|
||||
{
|
||||
wx_messagebox(NULL,"Can't open file for read","PCem error",WX_MB_OK);
|
||||
return TRUE;
|
||||
}
|
||||
fseeko64(f, -1, SEEK_END);
|
||||
sz = ftello64(f) + 1;
|
||||
fclose(f);
|
||||
check_hd_type(sz);
|
||||
|
||||
if (wx_dialogbox(hdlg, "HdSizeDlg", hdsize_dlgproc) == 1)
|
||||
{
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[2]"));
|
||||
sprintf(s, "%i", hd_new_spt);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[2]"));
|
||||
sprintf(s, "%i", hd_new_hpc);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[2]"));
|
||||
sprintf(s, "%i", hd_new_cyl);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_FN[2]"));
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)openfilestring);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_TEXT_SIZE[2]"));
|
||||
sprintf(s, "Size : %imb", (int)(((((uint64_t)hd_new_cyl*(uint64_t)hd_new_hpc)*(uint64_t)hd_new_spt)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
|
||||
hd_changed = 1;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
else if (ID_IS("IDC_NEW[3]"))
|
||||
{
|
||||
if (wx_dialogbox(hdlg, "HdNewDlg", hdnew_dlgproc) == 1)
|
||||
{
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[3]"));
|
||||
sprintf(s, "%i", hd_new_spt);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[3]"));
|
||||
sprintf(s, "%i", hd_new_hpc);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[3]"));
|
||||
sprintf(s, "%i", hd_new_cyl);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_FN[3]"));
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)hd_new_name);
|
||||
|
||||
h= wx_getdlgitem(hdlg, WX_ID("IDC_TEXT_SIZE[3]"));
|
||||
sprintf(s, "Size : %imb", (int)(((((uint64_t)hd_new_cyl*(uint64_t)hd_new_hpc)*(uint64_t)hd_new_spt)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
|
||||
hd_changed = 1;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
else if (ID_IS("IDC_FILE[3]"))
|
||||
{
|
||||
if (!getfile(hdlg, "Hard disc image (*.img)|*.img|All files (*.*)|*.*", ""))
|
||||
{
|
||||
f = fopen64(openfilestring, "rb");
|
||||
if (!f)
|
||||
{
|
||||
wx_messagebox(NULL,"Can't open file for read","PCem error",WX_MB_OK);
|
||||
return TRUE;
|
||||
}
|
||||
fseeko64(f, -1, SEEK_END);
|
||||
sz = ftello64(f) + 1;
|
||||
fclose(f);
|
||||
check_hd_type(sz);
|
||||
|
||||
if (wx_dialogbox(hdlg, "HdSizeDlg", hdsize_dlgproc) == 1)
|
||||
{
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[3]"));
|
||||
sprintf(s, "%i", hd_new_spt);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[3]"));
|
||||
sprintf(s, "%i", hd_new_hpc);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[3]"));
|
||||
sprintf(s, "%i", hd_new_cyl);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_FN[3]"));
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)openfilestring);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_TEXT_SIZE[3]"));
|
||||
sprintf(s, "Size : %imb", (int)(((((uint64_t)hd_new_cyl*(uint64_t)hd_new_hpc)*(uint64_t)hd_new_spt)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
|
||||
hd_changed = 1;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
else if (ID_IS("IDC_EDIT_SPT[0]") || ID_IS("IDC_EDIT_HPC[0]") || ID_IS("IDC_EDIT_CYL[0]"))
|
||||
{
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[0]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[0].spt);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[0]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[0].hpc);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[0]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[0].tracks);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_TEXT_SIZE[0]"));
|
||||
sprintf(s, "Size : %imb", ((((hd[0].tracks*hd[0].hpc)*hd[0].spt)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
return TRUE;
|
||||
}
|
||||
else if (ID_IS("IDC_EDIT_SPT[1]") || ID_IS("IDC_EDIT_HPC[1]") || ID_IS("IDC_EDIT_CYL[1]"))
|
||||
{
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[1]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[1].spt);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[1]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[1].hpc);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[1]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[1].tracks);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_TEXT_SIZE[1]"));
|
||||
sprintf(s, "Size : %imb", ((((hd[1].tracks*hd[1].hpc)*hd[1].spt)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
return TRUE;
|
||||
}
|
||||
else if (ID_IS("IDC_EDIT_SPT[2]") || ID_IS("IDC_EDIT_HPC[2]") || ID_IS("IDC_EDIT_CYL[2]"))
|
||||
{
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[2]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[2].spt);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[2]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[2].hpc);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[2]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[2].tracks);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_TEXT_SIZE[2]"));
|
||||
sprintf(s, "Size : %imb", ((((hd[2].tracks*hd[2].hpc)*hd[2].spt)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
return TRUE;
|
||||
}
|
||||
else if (ID_IS("IDC_EDIT_SPT[3]") || ID_IS("IDC_EDIT_HPC[3]") || ID_IS("IDC_EDIT_CYL[3]"))
|
||||
{
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_SPT[3]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[3].spt);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_HPC[3]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[3].hpc);
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_EDIT_CYL[3]"));
|
||||
wx_sendmessage(h, WX_WM_GETTEXT, 255, (LONG_PARAM)s);
|
||||
sscanf(s, "%i", &hd[3].tracks);
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_TEXT_SIZE[3]"));
|
||||
sprintf(s, "Size : %imb", ((((hd[3].tracks*hd[3].hpc)*hd[3].spt)*512)/1024)/1024);
|
||||
wx_sendmessage(h, WX_WM_SETTEXT, 0, (LONG_PARAM)s);
|
||||
return TRUE;
|
||||
}
|
||||
else if (ID_IS("IDC_HDD[0]"))
|
||||
{
|
||||
if (new_cdrom_channel == 0)
|
||||
new_cdrom_channel = -1;
|
||||
update_hdd_cdrom(hdlg);
|
||||
return TRUE;
|
||||
}
|
||||
else if (ID_IS("IDC_HDD[1]"))
|
||||
{
|
||||
if (new_cdrom_channel == 1)
|
||||
new_cdrom_channel = -1;
|
||||
update_hdd_cdrom(hdlg);
|
||||
return TRUE;
|
||||
}
|
||||
else if (ID_IS("IDC_HDD[2]"))
|
||||
{
|
||||
if (new_cdrom_channel == 2)
|
||||
new_cdrom_channel = -1;
|
||||
update_hdd_cdrom(hdlg);
|
||||
return TRUE;
|
||||
}
|
||||
else if (ID_IS("IDC_HDD[3]"))
|
||||
{
|
||||
if (new_cdrom_channel == 3)
|
||||
new_cdrom_channel = -1;
|
||||
update_hdd_cdrom(hdlg);
|
||||
return TRUE;
|
||||
|
||||
}
|
||||
else if (ID_IS("IDC_CDROM[0]"))
|
||||
{
|
||||
new_cdrom_channel = 0;
|
||||
update_hdd_cdrom(hdlg);
|
||||
return TRUE;
|
||||
}
|
||||
else if (ID_IS("IDC_CDROM[1]"))
|
||||
{
|
||||
new_cdrom_channel = 1;
|
||||
update_hdd_cdrom(hdlg);
|
||||
return TRUE;
|
||||
}
|
||||
else if (ID_IS("IDC_CDROM[2]"))
|
||||
{
|
||||
new_cdrom_channel = 2;
|
||||
update_hdd_cdrom(hdlg);
|
||||
return TRUE;
|
||||
}
|
||||
else if (ID_IS("IDC_CDROM[3]"))
|
||||
{
|
||||
new_cdrom_channel = 3;
|
||||
update_hdd_cdrom(hdlg);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void hdconf_open(void* hwnd)
|
||||
{
|
||||
wx_dialogbox(hwnd, "HdConfDlg", hdconf_dlgproc);
|
||||
}
|
||||
|
|
@ -18,6 +18,6 @@ void keyboard_poll_host()
|
|||
int c;
|
||||
|
||||
for (c = 0; c < 272; ++c)
|
||||
pcem_key[c] = rawinputkey[c];
|
||||
pcem_key[c] = rawinputkey[c] > 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,3 +12,12 @@ void midi_close()
|
|||
void midi_write(uint8_t val)
|
||||
{
|
||||
}
|
||||
|
||||
int midi_get_num_devs()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void midi_get_dev_name(int num, char *s)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#include <SDL2/SDL_mouse.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <string.h>
|
||||
#include "plat-mouse.h"
|
||||
|
||||
int mouse_buttons;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
#include <SDL2/SDL.h>
|
||||
#include "video.h"
|
||||
#include "wx-sdl2.h"
|
||||
#include "wx-sdl2-video.h"
|
||||
#include "ibm.h"
|
||||
#include "device.h"
|
||||
#include "video.h"
|
||||
#include "x86_ops.h"
|
||||
#include "mem.h"
|
||||
#include "codegen.h"
|
||||
|
|
|
|||
1656
src/wx-sdl2-video-gl3.c
Normal file
3
src/wx-sdl2-video-gl3.h
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
sdl_renderer_t* gl3_renderer_create();
|
||||
void gl3_renderer_close(sdl_renderer_t* renderer);
|
||||
int gl3_renderer_available(struct sdl_render_driver* driver);
|
||||
180
src/wx-sdl2-video-renderer.c
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
#include <SDL2/SDL.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "video.h"
|
||||
#include "wx-utils.h"
|
||||
#include "wx-sdl2-video.h"
|
||||
#include "wx-sdl2-video-renderer.h"
|
||||
|
||||
static SDL_Texture* texture = NULL;
|
||||
static SDL_Renderer* renderer = NULL;
|
||||
|
||||
extern int video_scale_mode;
|
||||
extern int video_vsync;
|
||||
extern int video_focus_dim;
|
||||
extern int take_screenshot;
|
||||
extern void screenshot_taken(unsigned char* rgb, int width, int height);
|
||||
|
||||
int sdl_video_renderer_init(SDL_Window* window, sdl_render_driver requested_render_driver, BITMAP* screen)
|
||||
{
|
||||
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, video_scale_mode ? "1" : "0");
|
||||
const char* driver = requested_render_driver.sdl_id;
|
||||
if (!driver) driver = "0";
|
||||
SDL_SetHint(SDL_HINT_RENDER_DRIVER, driver);
|
||||
|
||||
int flags = SDL_RENDERER_ACCELERATED;
|
||||
if (video_vsync) {
|
||||
flags |= SDL_RENDERER_PRESENTVSYNC;
|
||||
}
|
||||
renderer = SDL_CreateRenderer(window, -1, flags);
|
||||
|
||||
if (!renderer)
|
||||
{
|
||||
char message[200];
|
||||
sprintf(message,
|
||||
"SDL window could not be created! Error: %s\n",
|
||||
SDL_GetError());
|
||||
wx_messagebox(0, message, "SDL Error", WX_MB_OK);
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
SDL_RendererInfo rendererInfo;
|
||||
SDL_GetRendererInfo(renderer, &rendererInfo);
|
||||
sdl_render_driver* d = sdl_get_render_driver_by_name_ptr(rendererInfo.name);
|
||||
if (!d)
|
||||
strcpy(current_render_driver_name, "Unknown");
|
||||
else
|
||||
strcpy(current_render_driver_name, d->name);
|
||||
|
||||
texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888,
|
||||
SDL_TEXTUREACCESS_STREAMING,
|
||||
screen->w, screen->h);
|
||||
|
||||
return SDL_TRUE;
|
||||
|
||||
}
|
||||
|
||||
void sdl_video_renderer_close()
|
||||
{
|
||||
if (texture)
|
||||
{
|
||||
SDL_DestroyTexture(texture);
|
||||
texture = NULL;
|
||||
}
|
||||
if (renderer)
|
||||
{
|
||||
SDL_DestroyRenderer(renderer);
|
||||
renderer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void sdl_video_renderer_update(SDL_Window* window, SDL_Rect updated_rect, BITMAP* screen)
|
||||
{
|
||||
SDL_UpdateTexture(texture, &updated_rect, &((uint32_t*) screen->dat)[updated_rect.y * screen->w + updated_rect.x], screen->w * 4);
|
||||
}
|
||||
|
||||
void sdl_video_renderer_present(SDL_Window* window, SDL_Rect texture_rect, SDL_Rect window_rect, BITMAP* screen)
|
||||
{
|
||||
SDL_RenderClear(renderer);
|
||||
SDL_RenderCopy(renderer, texture, &texture_rect, &window_rect);
|
||||
int sshot = take_screenshot;
|
||||
if (!sshot)
|
||||
{
|
||||
if (video_focus_dim && !(SDL_GetWindowFlags(window)&SDL_WINDOW_INPUT_FOCUS)) {
|
||||
SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND);
|
||||
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0x80);
|
||||
SDL_RenderFillRect(renderer, NULL);
|
||||
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0xff);
|
||||
SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE);
|
||||
}
|
||||
if (flash.enabled)
|
||||
{
|
||||
SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND);
|
||||
SDL_SetRenderDrawColor(renderer, flash.color[0], flash.color[1], flash.color[2], flash.color[3]);
|
||||
SDL_RenderFillRect(renderer, NULL);
|
||||
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0xff);
|
||||
SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE);
|
||||
}
|
||||
}
|
||||
SDL_RenderPresent(renderer);
|
||||
|
||||
if (sshot)
|
||||
{
|
||||
take_screenshot = 0;
|
||||
|
||||
int width = window_rect.w;
|
||||
int height = window_rect.h;
|
||||
|
||||
SDL_GetWindowSize(window, &width, &height);
|
||||
|
||||
/* seems to work without rendering to texture first */
|
||||
// SDL_Texture* tex = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ABGR8888, SDL_TEXTUREACCESS_TARGET, width, height);
|
||||
//
|
||||
// SDL_SetRenderTarget(renderer, tex);
|
||||
// SDL_RenderClear(renderer);
|
||||
// SDL_RenderCopy(renderer, texture, &texture_rect, &window_rect);
|
||||
// SDL_RenderPresent(renderer);
|
||||
|
||||
unsigned char* rgba = (unsigned char*)malloc(width*height*4);
|
||||
int res = SDL_RenderReadPixels(renderer, NULL, SDL_PIXELFORMAT_ABGR8888, rgba, width*4);
|
||||
|
||||
// SDL_SetRenderTarget(renderer, NULL);
|
||||
// SDL_DestroyTexture(tex);
|
||||
|
||||
if (!res)
|
||||
{
|
||||
int x, y;
|
||||
unsigned char* rgb = (unsigned char*)malloc(width*height*3);
|
||||
|
||||
for (x = 0; x < width; ++x)
|
||||
{
|
||||
for (y = 0; y < height; ++y)
|
||||
{
|
||||
rgb[(y*width+x)*3+0] = rgba[(y*width+x)*4+0];
|
||||
rgb[(y*width+x)*3+1] = rgba[(y*width+x)*4+1];
|
||||
rgb[(y*width+x)*3+2] = rgba[(y*width+x)*4+2];
|
||||
}
|
||||
}
|
||||
|
||||
screenshot_taken(rgb, width, height);
|
||||
|
||||
free(rgb);
|
||||
}
|
||||
else
|
||||
screenshot_taken(0, 0, 0);
|
||||
|
||||
free(rgba);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sdl_renderer_t* sdl2_renderer_create()
|
||||
{
|
||||
sdl_renderer_t* renderer = malloc(sizeof(sdl_renderer_t));
|
||||
renderer->init = sdl_video_renderer_init;
|
||||
renderer->close = sdl_video_renderer_close;
|
||||
renderer->update = sdl_video_renderer_update;
|
||||
renderer->present = sdl_video_renderer_present;
|
||||
renderer->always_update = 0;
|
||||
return renderer;
|
||||
}
|
||||
|
||||
void sdl2_renderer_close(sdl_renderer_t* renderer)
|
||||
{
|
||||
free(renderer);
|
||||
}
|
||||
|
||||
int sdl2_renderer_available(struct sdl_render_driver* driver)
|
||||
{
|
||||
int i;
|
||||
SDL_RendererInfo renderInfo;
|
||||
for (i = 0; i < SDL_GetNumRenderDrivers(); ++i)
|
||||
{
|
||||
SDL_GetRenderDriverInfo(i, &renderInfo);
|
||||
if (!strcmp(driver->sdl_id, renderInfo.name))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
3
src/wx-sdl2-video-renderer.h
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
sdl_renderer_t* sdl2_renderer_create();
|
||||
void sdl2_renderer_close(sdl_renderer_t* renderer);
|
||||
int sdl2_renderer_available(struct sdl_render_driver* driver);
|
||||
|
|
@ -1,17 +1,19 @@
|
|||
#include "wx-sdl2-video.h"
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "wx-sdl2.h"
|
||||
#include "video.h"
|
||||
#include "wx-sdl2-video.h"
|
||||
|
||||
#include "wx-sdl2-video-gl3.h"
|
||||
#include "wx-sdl2-video-renderer.h"
|
||||
|
||||
void video_blit_complete();
|
||||
|
||||
static BITMAP *buffer32_vscale;
|
||||
BITMAP *screen;
|
||||
SDL_Texture* texture = NULL;
|
||||
SDL_Renderer* renderer = NULL;
|
||||
SDL_Rect old_screen_rect;
|
||||
SDL_Rect screen_rect;
|
||||
SDL_Rect updated_rect;
|
||||
|
|
@ -23,7 +25,6 @@ int updated = 0;
|
|||
SDL_mutex* blitMutex = NULL;
|
||||
|
||||
static void sdl_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h);
|
||||
static void sdl_blit_memtoscreen_8(int x, int y, int w, int h);
|
||||
|
||||
int video_scale_mode = 1;
|
||||
int video_vsync = 0;
|
||||
|
|
@ -31,17 +32,19 @@ int video_focus_dim = 0;
|
|||
int video_fullscreen_mode = 0;
|
||||
|
||||
static sdl_render_driver sdl_render_drivers[] = {
|
||||
{ RENDERER_AUTO, "auto", "Auto" },
|
||||
{ RENDERER_DIRECT3D, "direct3d", "Direct3D" },
|
||||
{ RENDERER_OPENGL, "opengl", "OpenGL" },
|
||||
{ RENDERER_OPENGLES2, "opengles2", "OpenGL ES 2" },
|
||||
{ RENDERER_OPENGLES, "opengles", "OpenGL ES" },
|
||||
{ RENDERER_SOFTWARE, "software", "Software" }
|
||||
{ RENDERER_AUTO, "auto", "Auto", 0, sdl2_renderer_create, sdl2_renderer_close, sdl2_renderer_available },
|
||||
{ RENDERER_DIRECT3D, "direct3d", "Direct3D", 0, sdl2_renderer_create, sdl2_renderer_close, sdl2_renderer_available },
|
||||
{ RENDERER_OPENGL, "opengl", "OpenGL", 0, sdl2_renderer_create, sdl2_renderer_close, sdl2_renderer_available },
|
||||
{ RENDERER_OPENGLES2, "opengles2", "OpenGL ES 2", 0, sdl2_renderer_create, sdl2_renderer_close, sdl2_renderer_available },
|
||||
{ RENDERER_OPENGLES, "opengles", "OpenGL ES", 0, sdl2_renderer_create, sdl2_renderer_close, sdl2_renderer_available },
|
||||
{ RENDERER_SOFTWARE, "software", "Software", 0, sdl2_renderer_create, sdl2_renderer_close, sdl2_renderer_available },
|
||||
{ RENDERER_GL3, "gl3", "OpenGL 3.0", SDL_WINDOW_OPENGL, gl3_renderer_create, gl3_renderer_close, gl3_renderer_available }
|
||||
};
|
||||
|
||||
sdl_render_driver requested_render_driver;
|
||||
|
||||
char current_render_driver_name[50];
|
||||
static sdl_renderer_t* renderer = NULL;
|
||||
|
||||
void hline(BITMAP *b, int x1, int y, int x2, int col)
|
||||
{
|
||||
|
|
@ -70,6 +73,7 @@ void set_palette(PALETTE p)
|
|||
|
||||
void destroy_bitmap(BITMAP *b)
|
||||
{
|
||||
free(b);
|
||||
}
|
||||
|
||||
BITMAP *create_bitmap(int x, int y)
|
||||
|
|
@ -221,8 +225,7 @@ static void sdl_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h)
|
|||
return; /*Nothing to do*/
|
||||
}
|
||||
|
||||
int xx, yy;
|
||||
SDL_Rect rect;
|
||||
int yy;
|
||||
SDL_LockMutex(blitMutex);
|
||||
for (yy = y1; yy < y2; yy++)
|
||||
{
|
||||
|
|
@ -259,6 +262,8 @@ int sdl_video_init()
|
|||
|
||||
void sdl_video_close()
|
||||
{
|
||||
requested_render_driver.renderer_close(renderer);
|
||||
renderer = NULL;
|
||||
destroy_bitmap(buffer32_vscale);
|
||||
destroy_bitmap(screen);
|
||||
SDL_DestroyMutex(blitMutex);
|
||||
|
|
@ -266,44 +271,15 @@ void sdl_video_close()
|
|||
|
||||
int sdl_renderer_init(SDL_Window* window)
|
||||
{
|
||||
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, video_scale_mode ? "1" : "0");
|
||||
const char* driver = requested_render_driver.sdl_id;
|
||||
if (!driver) driver = "0";
|
||||
SDL_SetHint(SDL_HINT_RENDER_DRIVER, driver);
|
||||
|
||||
int flags = SDL_RENDERER_ACCELERATED;
|
||||
if (video_vsync) {
|
||||
flags |= SDL_RENDERER_PRESENTVSYNC;
|
||||
}
|
||||
renderer = SDL_CreateRenderer(window, -1, flags);
|
||||
|
||||
SDL_RendererInfo rendererInfo;
|
||||
SDL_GetRendererInfo(renderer, &rendererInfo);
|
||||
sdl_render_driver* d = sdl_get_render_driver_by_name_ptr(rendererInfo.name);
|
||||
if (!d)
|
||||
strcpy(current_render_driver_name, "Unknown");
|
||||
else
|
||||
strcpy(current_render_driver_name, d->name);
|
||||
|
||||
texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888,
|
||||
SDL_TEXTUREACCESS_STREAMING,
|
||||
screen->w, screen->h);
|
||||
|
||||
return SDL_TRUE;
|
||||
renderer = requested_render_driver.renderer_create();
|
||||
return renderer->init(window, requested_render_driver, screen);
|
||||
}
|
||||
|
||||
void sdl_renderer_close()
|
||||
{
|
||||
if (texture)
|
||||
{
|
||||
SDL_DestroyTexture(texture);
|
||||
texture = NULL;
|
||||
}
|
||||
if (renderer)
|
||||
{
|
||||
SDL_DestroyRenderer(renderer);
|
||||
renderer = NULL;
|
||||
}
|
||||
renderer->close();
|
||||
renderer = NULL;
|
||||
}
|
||||
|
||||
int sdl_renderer_update(SDL_Window* window)
|
||||
|
|
@ -313,32 +289,42 @@ int sdl_renderer_update(SDL_Window* window)
|
|||
if (updated)
|
||||
{
|
||||
updated = 0;
|
||||
SDL_UpdateTexture(texture, &updated_rect,
|
||||
&((uint32_t*) screen->dat)[updated_rect.y
|
||||
* screen->w + updated_rect.x],
|
||||
screen->w * 4);
|
||||
renderer->update(window, updated_rect, screen);
|
||||
texture_rect.w = blit_rect.w;
|
||||
texture_rect.h = blit_rect.h;
|
||||
render = 1;
|
||||
}
|
||||
SDL_UnlockMutex(blitMutex);
|
||||
return render;
|
||||
return render || renderer->always_update;
|
||||
}
|
||||
|
||||
void sdl_renderer_present(SDL_Window* window)
|
||||
{
|
||||
if (flash.enabled)
|
||||
{
|
||||
int elapsed = SDL_GetTicks() - flash.start;
|
||||
float a = flash.func(elapsed / (float)flash.time) * (flash.alpha&0xff);
|
||||
flash.color[3] = (char)a;
|
||||
if (elapsed >= flash.time)
|
||||
flash.enabled = 0;
|
||||
}
|
||||
|
||||
SDL_Rect wr;
|
||||
int l, t, r, b;
|
||||
SDL_GetWindowSize(window, &wr.w, &wr.h);
|
||||
sdl_scale(video_fullscreen_scale, wr, &wr, texture_rect.w, texture_rect.h);
|
||||
SDL_RenderClear(renderer);
|
||||
SDL_RenderCopy(renderer, texture, &texture_rect, &wr);
|
||||
if (video_focus_dim && !(SDL_GetWindowFlags(window)&SDL_WINDOW_INPUT_FOCUS)) {
|
||||
SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND);
|
||||
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0x80);
|
||||
SDL_RenderFillRect(renderer, NULL);
|
||||
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0xff);
|
||||
SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE);
|
||||
}
|
||||
SDL_RenderPresent(renderer);
|
||||
renderer->present(window, texture_rect, wr, screen);
|
||||
|
||||
}
|
||||
|
||||
void color_flash(FLASH_FUNC func, int time_ms, char r, char g, char b, char a)
|
||||
{
|
||||
flash.func = func;
|
||||
flash.color[0] = r;
|
||||
flash.color[1] = g;
|
||||
flash.color[2] = b;
|
||||
flash.color[3] = 0;
|
||||
flash.alpha = a;
|
||||
flash.start = SDL_GetTicks();
|
||||
flash.time = time_ms;
|
||||
flash.enabled = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,44 @@
|
|||
#include <SDL2/SDL.h>
|
||||
|
||||
#define RENDERER_AUTO 0
|
||||
#define RENDERER_DIRECT3D 1
|
||||
#define RENDERER_OPENGL 2
|
||||
#define RENDERER_OPENGLES2 3
|
||||
#define RENDERER_OPENGLES 4
|
||||
#define RENDERER_SOFTWARE 5
|
||||
#define RENDERER_GL3 6
|
||||
|
||||
struct sdl_render_driver;
|
||||
|
||||
typedef struct sdl_renderer_t {
|
||||
int (*init)(SDL_Window* window, struct sdl_render_driver driver, BITMAP* screen);
|
||||
void (*close)();
|
||||
void (*update)(SDL_Window* window, SDL_Rect updated_rect, BITMAP* screen);
|
||||
void (*present)(SDL_Window* window, SDL_Rect texture_rect, SDL_Rect window_rect, BITMAP* screen);
|
||||
int always_update;
|
||||
} sdl_renderer_t;
|
||||
|
||||
typedef struct sdl_render_driver {
|
||||
int id;
|
||||
const char* sdl_id;
|
||||
const char* name;
|
||||
int sdl_window_params;
|
||||
sdl_renderer_t* (*renderer_create)();
|
||||
void (*renderer_close)(sdl_renderer_t* renderer);
|
||||
int (*renderer_available)(struct sdl_render_driver* driver);
|
||||
} sdl_render_driver;
|
||||
|
||||
typedef float (*FLASH_FUNC)(float v);
|
||||
|
||||
typedef struct flash_t {
|
||||
int enabled;
|
||||
int time;
|
||||
char color[4];
|
||||
int start;
|
||||
char alpha;
|
||||
FLASH_FUNC func;
|
||||
} flash_t;
|
||||
|
||||
flash_t flash;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -30,6 +56,8 @@ sdl_render_driver sdl_get_render_driver_by_id(int id, int def);
|
|||
sdl_render_driver sdl_get_render_driver_by_name(const char* name, int def);
|
||||
sdl_render_driver* sdl_get_render_driver_by_name_ptr(const char* name);
|
||||
|
||||
void color_flash(FLASH_FUNC func, int time_ms, char r, char g, char b, char a);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
360
src/wx-sdl2.c
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#ifdef __WINDOWS__
|
||||
#define BITMAP WINDOWS_BITMAP
|
||||
#undef UNICODE
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#undef BITMAP
|
||||
|
|
@ -75,6 +76,7 @@ emulation_state_t emulation_state = EMULATION_STOPPED;
|
|||
int pause = 0;
|
||||
|
||||
int window_doreset = 0;
|
||||
int window_dosetresize = 0;
|
||||
int renderer_doreset = 0;
|
||||
int window_dofullscreen = 0;
|
||||
int window_dowindowed = 0;
|
||||
|
|
@ -91,9 +93,19 @@ int video_height = 480;
|
|||
char menuitem[60];
|
||||
|
||||
extern int config_selection_open(void* hwnd, int inited);
|
||||
extern int shader_manager_open(void* hwnd);
|
||||
|
||||
extern void sdl_set_window_title(const char* title);
|
||||
|
||||
extern float gl3_shader_refresh_rate;
|
||||
extern float gl3_input_scale;
|
||||
extern int gl3_input_stretch;
|
||||
extern char gl3_shader_file[20][512];
|
||||
|
||||
char screenshot_format[10];
|
||||
int screenshot_flash = 1;
|
||||
int take_screenshot = 0;
|
||||
|
||||
void warning(const char *format, ...)
|
||||
{
|
||||
char buf[1024];
|
||||
|
|
@ -114,6 +126,16 @@ void updatewindowsize(int x, int y)
|
|||
display_resize(x, y);
|
||||
}
|
||||
|
||||
unsigned int get_ticks()
|
||||
{
|
||||
return SDL_GetTicks();
|
||||
}
|
||||
|
||||
void delay_ms(unsigned int ms)
|
||||
{
|
||||
SDL_Delay(ms);
|
||||
}
|
||||
|
||||
void startblit()
|
||||
{
|
||||
SDL_LockMutex(ghMutex);
|
||||
|
|
@ -143,11 +165,8 @@ uint64_t main_time;
|
|||
|
||||
int mainthread(void* param)
|
||||
{
|
||||
int i;
|
||||
|
||||
SDL_SetThreadPriority(SDL_THREAD_PRIORITY_HIGH);
|
||||
|
||||
int t = 0;
|
||||
int frames = 0;
|
||||
uint32_t old_time, new_time;
|
||||
|
||||
|
|
@ -210,6 +229,37 @@ void set_window_title(const char *s)
|
|||
sdl_set_window_title(s);
|
||||
}
|
||||
|
||||
float flash_func(float x)
|
||||
{
|
||||
return 1 - pow(x, 4);
|
||||
}
|
||||
|
||||
float flash_failed_func(float x)
|
||||
{
|
||||
return fabs(sin(x*3.1415926*2));
|
||||
}
|
||||
|
||||
void screenshot_taken(unsigned char* rgb, int width, int height)
|
||||
{
|
||||
char name[512];
|
||||
char date[128];
|
||||
strcpy(name, "Screenshot from ");
|
||||
wx_date_format(date, "%Y-%m-%d %H-%M-%S");
|
||||
strcat(name, date);
|
||||
if (wx_image_save(screenshots_path, name, screenshot_format, rgb, width, height, 0))
|
||||
{
|
||||
pclog("Screenshot saved\n");
|
||||
if (screenshot_flash)
|
||||
color_flash(flash_func, 500, 0xff, 0xff, 0xff, 0xff);
|
||||
}
|
||||
else
|
||||
{
|
||||
pclog("Screenshot was not saved\n");
|
||||
if (screenshot_flash)
|
||||
color_flash(flash_failed_func, 500, 0xff, 0, 0, 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t timer_read()
|
||||
{
|
||||
return SDL_GetPerformanceCounter();
|
||||
|
|
@ -223,24 +273,69 @@ Uint32 timer_onesec(Uint32 interval, void* param)
|
|||
|
||||
void sdl_loadconfig()
|
||||
{
|
||||
video_fullscreen = config_get_int(CFG_GLOBAL, "SDL2", "fullscreen", video_fullscreen);
|
||||
video_fullscreen_mode = config_get_int(CFG_GLOBAL, "SDL2", "fullscreen_mode", video_fullscreen_mode);
|
||||
video_scale = config_get_int(CFG_GLOBAL, "SDL2", "scale", video_scale);
|
||||
video_scale_mode = config_get_int(CFG_GLOBAL, "SDL2", "scale_mode", video_scale_mode);
|
||||
video_vsync = config_get_int(CFG_GLOBAL, "SDL2", "vsync", video_vsync);
|
||||
video_focus_dim = config_get_int(CFG_GLOBAL, "SDL2", "focus_dim", video_focus_dim);
|
||||
requested_render_driver = sdl_get_render_driver_by_name(config_get_string(CFG_GLOBAL, "SDL2", "render_driver", ""), RENDERER_SOFTWARE);
|
||||
vid_resize = config_get_int(CFG_MACHINE, NULL, "vid_resize", 0);
|
||||
video_fullscreen_scale = config_get_int(CFG_MACHINE, NULL, "video_fullscreen_scale", 0);
|
||||
video_fullscreen_first = config_get_int(CFG_MACHINE, NULL, "video_fullscreen_first", 1);
|
||||
|
||||
strcpy(screenshot_format, config_get_string(CFG_MACHINE, "SDL2", "screenshot_format", IMAGE_PNG));
|
||||
screenshot_flash = config_get_int(CFG_MACHINE, "SDL2", "screenshot_flash", 1);
|
||||
|
||||
video_fullscreen = config_get_int(CFG_MACHINE, "SDL2", "fullscreen", video_fullscreen);
|
||||
video_fullscreen_mode = config_get_int(CFG_MACHINE, "SDL2", "fullscreen_mode", video_fullscreen_mode);
|
||||
video_scale = config_get_int(CFG_MACHINE, "SDL2", "scale", video_scale);
|
||||
video_scale_mode = config_get_int(CFG_MACHINE, "SDL2", "scale_mode", video_scale_mode);
|
||||
video_vsync = config_get_int(CFG_MACHINE, "SDL2", "vsync", video_vsync);
|
||||
video_focus_dim = config_get_int(CFG_MACHINE, "SDL2", "focus_dim", video_focus_dim);
|
||||
requested_render_driver = sdl_get_render_driver_by_name(config_get_string(CFG_MACHINE, "SDL2", "render_driver", ""), RENDERER_SOFTWARE);
|
||||
|
||||
gl3_input_scale = config_get_float(CFG_MACHINE, "GL3", "input_scale", gl3_input_scale);
|
||||
gl3_input_stretch = config_get_int(CFG_MACHINE, "GL3", "input_stretch", gl3_input_stretch);
|
||||
gl3_shader_refresh_rate = config_get_float(CFG_MACHINE, "GL3", "shader_refresh_rate", gl3_shader_refresh_rate);
|
||||
|
||||
memset(&gl3_shader_file, 0, sizeof(gl3_shader_file));
|
||||
int num_shaders = config_get_int(CFG_MACHINE, "GL3 Shaders", "shaders", 0);
|
||||
char s[20];
|
||||
int i;
|
||||
for (i = 0; i < num_shaders; ++i)
|
||||
{
|
||||
sprintf(s, "shader%d", i);
|
||||
strncpy(gl3_shader_file[i], config_get_string(CFG_MACHINE, "GL3 Shaders", s, ""), 511);
|
||||
gl3_shader_file[i][511] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void sdl_saveconfig()
|
||||
{
|
||||
config_set_int(CFG_GLOBAL, "SDL2", "fullscreen", video_fullscreen);
|
||||
config_set_int(CFG_GLOBAL, "SDL2", "fullscreen_mode", video_fullscreen_mode);
|
||||
config_set_int(CFG_GLOBAL, "SDL2", "scale", video_scale);
|
||||
config_set_int(CFG_GLOBAL, "SDL2", "scale_mode", video_scale_mode);
|
||||
config_set_int(CFG_GLOBAL, "SDL2", "vsync", video_vsync);
|
||||
config_set_int(CFG_GLOBAL, "SDL2", "focus_dim", video_focus_dim);
|
||||
config_set_string(CFG_GLOBAL, "SDL2", "render_driver", (char*)requested_render_driver.sdl_id);
|
||||
config_set_int(CFG_MACHINE, NULL, "vid_resize", vid_resize);
|
||||
config_set_int(CFG_MACHINE, NULL, "video_fullscreen_scale", video_fullscreen_scale);
|
||||
config_set_int(CFG_MACHINE, NULL, "video_fullscreen_first", video_fullscreen_first);
|
||||
|
||||
config_set_string(CFG_MACHINE, "SDL2", "screenshot_format", screenshot_format);
|
||||
config_set_int(CFG_MACHINE, "SDL2", "screenshot_flash", screenshot_flash);
|
||||
|
||||
config_set_int(CFG_MACHINE, "SDL2", "fullscreen", video_fullscreen);
|
||||
config_set_int(CFG_MACHINE, "SDL2", "fullscreen_mode", video_fullscreen_mode);
|
||||
config_set_int(CFG_MACHINE, "SDL2", "scale", video_scale);
|
||||
config_set_int(CFG_MACHINE, "SDL2", "scale_mode", video_scale_mode);
|
||||
config_set_int(CFG_MACHINE, "SDL2", "vsync", video_vsync);
|
||||
config_set_int(CFG_MACHINE, "SDL2", "focus_dim", video_focus_dim);
|
||||
config_set_string(CFG_MACHINE, "SDL2", "render_driver", (char*)requested_render_driver.sdl_id);
|
||||
|
||||
config_set_float(CFG_MACHINE, "GL3", "input_scale", gl3_input_scale);
|
||||
config_set_int(CFG_MACHINE, "GL3", "input_stretch", gl3_input_stretch);
|
||||
config_set_float(CFG_MACHINE, "GL3", "shader_refresh_rate", gl3_shader_refresh_rate);
|
||||
|
||||
char s[20];
|
||||
int i;
|
||||
for (i = 0; i < 20; ++i)
|
||||
{
|
||||
sprintf(s, "shader%d", i);
|
||||
if (strlen(gl3_shader_file[i]))
|
||||
config_set_string(CFG_MACHINE, "GL3 Shaders", s, gl3_shader_file[i]);
|
||||
else
|
||||
break;
|
||||
}
|
||||
config_set_int(CFG_MACHINE, "GL3 Shaders", "shaders", i);
|
||||
}
|
||||
|
||||
void update_cdrom_menu(void* hmenu)
|
||||
|
|
@ -260,19 +355,19 @@ void update_cdrom_menu(void* hmenu)
|
|||
|
||||
void wx_initmenu()
|
||||
{
|
||||
char s[32];
|
||||
menu = wx_getmenu(ghwnd);
|
||||
|
||||
void* cdrom_submenu = wx_getsubmenu(menu, WX_ID("IDM_CDROM"));
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
char s[32];
|
||||
int c;
|
||||
/* Loop through each Windows drive letter and test to see if
|
||||
it's a CDROM */
|
||||
for (c='A';c<='Z';c++)
|
||||
{
|
||||
sprintf(s,"%c:\\",c);
|
||||
if (GetDriveType(s)==DRIVE_CDROM)
|
||||
if (GetDriveTypeA(s)==DRIVE_CDROM)
|
||||
{
|
||||
sprintf(s, "Host CD/DVD Drive (%c:)", c);
|
||||
wx_appendmenu(cdrom_submenu, IDM_CDROM_REAL+(c-'A'), s, wxITEM_RADIO);
|
||||
|
|
@ -284,7 +379,7 @@ void wx_initmenu()
|
|||
|
||||
}
|
||||
|
||||
void wx_setupmenu()
|
||||
int wx_setupmenu(void* data)
|
||||
{
|
||||
int c;
|
||||
update_cdrom_menu(menu);
|
||||
|
|
@ -300,6 +395,9 @@ void wx_setupmenu()
|
|||
sprintf(menuitem, "IDM_SND_BUF[%d]", (int)(log(sound_buf_len/MIN_SND_BUF)/log(2)));
|
||||
wx_checkmenuitem(menu, WX_ID(menuitem), WX_MB_CHECKED);
|
||||
|
||||
sprintf(menuitem, "IDM_SND_BUF[%d]", (int)(log(sound_buf_len/MIN_SND_BUF)/log(2)));
|
||||
wx_checkmenuitem(menu, WX_ID(menuitem), WX_MB_CHECKED);
|
||||
|
||||
sprintf(menuitem, "IDM_VID_SCALE_MODE[%d]", video_scale_mode);
|
||||
wx_checkmenuitem(menu, WX_ID(menuitem), WX_MB_CHECKED);
|
||||
sprintf(menuitem, "IDM_VID_SCALE[%d]", video_scale);
|
||||
|
|
@ -309,34 +407,54 @@ void wx_setupmenu()
|
|||
wx_checkmenuitem(menu, WX_ID("IDM_VID_VSYNC"), video_vsync);
|
||||
wx_checkmenuitem(menu, WX_ID("IDM_VID_LOST_FOCUS_DIM"), video_focus_dim);
|
||||
|
||||
int format = 0;
|
||||
if (!strcmp(screenshot_format, IMAGE_TIFF))
|
||||
format = 1;
|
||||
else if (!strcmp(screenshot_format, IMAGE_BMP))
|
||||
format = 2;
|
||||
else if (!strcmp(screenshot_format, IMAGE_JPG))
|
||||
format = 3;
|
||||
sprintf(menuitem, "IDM_SCREENSHOT_FORMAT[%d]", format);
|
||||
wx_checkmenuitem(menu, WX_ID(menuitem), WX_MB_CHECKED);
|
||||
wx_checkmenuitem(menu, WX_ID("IDM_SCREENSHOT_FLASH"), screenshot_flash);
|
||||
|
||||
int num_renderers;
|
||||
sdl_render_driver* drivers = sdl_get_render_drivers(&num_renderers);
|
||||
for (c = 1; c < num_renderers; ++c)
|
||||
{
|
||||
sprintf(menuitem, "IDM_VID_RENDER_DRIVER[%d]", drivers[c].id);
|
||||
wx_enablemenuitem(menu, WX_ID(menuitem), 0);
|
||||
}
|
||||
SDL_RendererInfo renderInfo;
|
||||
for (c = 0; c < SDL_GetNumRenderDrivers(); ++c)
|
||||
{
|
||||
SDL_GetRenderDriverInfo(c, &renderInfo);
|
||||
sdl_render_driver* driver = sdl_get_render_driver_by_name_ptr(renderInfo.name);
|
||||
|
||||
if (driver)
|
||||
{
|
||||
pclog("Renderer: %s (%d)\n", renderInfo.name, driver->id);
|
||||
sprintf(menuitem, "IDM_VID_RENDER_DRIVER[%d]", driver->id);
|
||||
wx_enablemenuitem(menu, WX_ID(menuitem), 1);
|
||||
}
|
||||
wx_enablemenuitem(menu, WX_ID(menuitem), drivers[c].renderer_available(&drivers[c]));
|
||||
}
|
||||
sprintf(menuitem, "IDM_VID_RENDER_DRIVER[%d]", requested_render_driver.id);
|
||||
wx_checkmenuitem(menu, WX_ID(menuitem), WX_MB_CHECKED);
|
||||
|
||||
// wx_enablemenuitem(menu, WX_ID("IDM_VID_SDL2"), requested_render_driver.id != RENDERER_GL3);
|
||||
wx_enablemenuitem(menu, WX_ID("IDM_VID_GL3"), requested_render_driver.id == RENDERER_GL3);
|
||||
|
||||
sprintf(menuitem, "IDM_VID_GL3_INPUT_STRETCH[%d]", gl3_input_stretch);
|
||||
wx_checkmenuitem(menu, WX_ID(menuitem), WX_MB_CHECKED);
|
||||
sprintf(menuitem, "IDM_VID_GL3_INPUT_SCALE[%d]", (int)((gl3_input_scale-0.5)*2));
|
||||
wx_checkmenuitem(menu, WX_ID(menuitem), WX_MB_CHECKED);
|
||||
sprintf(menuitem, "IDM_VID_GL3_SHADER_REFRESH_RATE[%g]", gl3_shader_refresh_rate);
|
||||
wx_checkmenuitem(menu, WX_ID(menuitem), WX_MB_CHECKED);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void sdl_onconfigloaded()
|
||||
{
|
||||
if (ghwnd)
|
||||
wx_callback(ghwnd, wx_setupmenu);
|
||||
wx_callback(ghwnd, wx_setupmenu, 0);
|
||||
|
||||
/* create directories */
|
||||
if (!wx_dir_exists(configs_path))
|
||||
wx_create_directory(configs_path);
|
||||
if (!wx_dir_exists(nvr_path))
|
||||
wx_create_directory(nvr_path);
|
||||
if (!wx_dir_exists(logs_path))
|
||||
wx_create_directory(logs_path);
|
||||
if (!wx_dir_exists(screenshots_path))
|
||||
wx_create_directory(screenshots_path);
|
||||
}
|
||||
|
||||
extern void wx_loadconfig();
|
||||
|
|
@ -344,10 +462,10 @@ extern void wx_saveconfig();
|
|||
|
||||
int pc_main(int argc, char** argv)
|
||||
{
|
||||
char s[512];
|
||||
paths_init();
|
||||
|
||||
#ifdef __linux__
|
||||
char s[512];
|
||||
/* create directories if they don't exist */
|
||||
if (!wx_setup(pcem_path))
|
||||
return FALSE;
|
||||
|
|
@ -359,6 +477,8 @@ int pc_main(int argc, char** argv)
|
|||
set_default_nvr_path(s);
|
||||
append_filename(s, pcem_path, "configs/", 511);
|
||||
set_default_configs_path(s);
|
||||
append_filename(s, pcem_path, "screenshots/", 511);
|
||||
set_default_screenshots_path(s);
|
||||
append_filename(s, pcem_path, "logs/", 511);
|
||||
set_default_logs_path(s);
|
||||
#endif
|
||||
|
|
@ -410,7 +530,7 @@ int wx_start(void* hwnd)
|
|||
readflash = 0;
|
||||
|
||||
wx_initmenu();
|
||||
wx_setupmenu();
|
||||
wx_setupmenu(0);
|
||||
|
||||
d = romset;
|
||||
for (c = 0; c < ROM_MAX; c++)
|
||||
|
|
@ -434,48 +554,9 @@ int wx_start(void* hwnd)
|
|||
}
|
||||
|
||||
romset = d;
|
||||
c = loadbios();
|
||||
|
||||
if (!c)
|
||||
{
|
||||
if (romset != -1)
|
||||
wx_messagebox(hwnd,
|
||||
"Configured romset not available.\nDefaulting to available romset.",
|
||||
"PCem error", WX_MB_OK);
|
||||
for (c = 0; c < ROM_MAX; c++)
|
||||
{
|
||||
if (romspresent[c])
|
||||
{
|
||||
romset = c;
|
||||
model = model_getmodel(romset);
|
||||
saveconfig(NULL);
|
||||
resetpchard();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (c = 0; c < GFX_MAX; c++)
|
||||
gfx_present[c] = video_card_available(video_old_to_new(c));
|
||||
|
||||
if (!video_card_available(video_old_to_new(gfxcard)))
|
||||
{
|
||||
if (romset != -1)
|
||||
wx_messagebox(hwnd,
|
||||
"Configured video BIOS not available.\nDefaulting to available romset.",
|
||||
"PCem error", WX_MB_OK);
|
||||
for (c = GFX_MAX - 1; c >= 0; c--)
|
||||
{
|
||||
if (gfx_present[c])
|
||||
{
|
||||
gfxcard = c;
|
||||
saveconfig(NULL);
|
||||
resetpchard();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -494,6 +575,7 @@ int start_emulation(void* params)
|
|||
{
|
||||
if (resume_emulation())
|
||||
return TRUE;
|
||||
int c;
|
||||
pclog("Starting emulation...\n");
|
||||
loadconfig(NULL);
|
||||
|
||||
|
|
@ -504,6 +586,40 @@ int start_emulation(void* params)
|
|||
mainMutex = SDL_CreateMutex();
|
||||
mainCond = SDL_CreateCond();
|
||||
|
||||
if (!loadbios())
|
||||
{
|
||||
if (romset != -1)
|
||||
wx_messagebox(ghwnd,
|
||||
"Configured romset not available.\nDefaulting to available romset.",
|
||||
"PCem error", WX_MB_OK);
|
||||
for (c = 0; c < ROM_MAX; c++)
|
||||
{
|
||||
if (romspresent[c])
|
||||
{
|
||||
romset = c;
|
||||
model = model_getmodel(romset);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!video_card_available(video_old_to_new(gfxcard)))
|
||||
{
|
||||
if (romset != -1)
|
||||
wx_messagebox(ghwnd,
|
||||
"Configured video BIOS not available.\nDefaulting to available romset.",
|
||||
"PCem error", WX_MB_OK);
|
||||
for (c = GFX_MAX - 1; c >= 0; c--)
|
||||
{
|
||||
if (gfx_present[c])
|
||||
{
|
||||
gfxcard = c;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
loadbios();
|
||||
resetpchard();
|
||||
|
||||
|
|
@ -617,7 +733,6 @@ void atapi_close(void)
|
|||
|
||||
int wx_handle_command(void* hwnd, int wParam, int checked)
|
||||
{
|
||||
SDL_Rect rect;
|
||||
void* hmenu;
|
||||
char temp_image_path[1024];
|
||||
int new_cdrom_drive;
|
||||
|
|
@ -690,8 +805,8 @@ int wx_handle_command(void* hwnd, int wParam, int checked)
|
|||
}
|
||||
else if (ID_IS("IDM_BPB_DISABLE"))
|
||||
{
|
||||
bpb_disable = checked;
|
||||
wx_checkmenuitem(hmenu, WX_ID("IDM_BPB_DISABLE"), bpb_disable ? WX_MB_CHECKED : WX_MB_UNCHECKED);
|
||||
bpb_disable = !bpb_disable;
|
||||
wx_checkmenuitem(hmenu, wParam, bpb_disable);
|
||||
saveconfig(NULL);
|
||||
}
|
||||
else if (ID_IS("IDM_MACHINE_TOGGLE"))
|
||||
|
|
@ -701,13 +816,38 @@ int wx_handle_command(void* hwnd, int wParam, int checked)
|
|||
}
|
||||
else if (ID_IS("IDM_VID_RESIZE"))
|
||||
{
|
||||
vid_resize = checked;
|
||||
window_doreset = 1;
|
||||
vid_resize = !vid_resize;
|
||||
wx_checkmenuitem(hmenu, wParam, vid_resize);
|
||||
window_dosetresize = 1;
|
||||
saveconfig(NULL);
|
||||
}
|
||||
else if (ID_IS("IDM_SCREENSHOT"))
|
||||
{
|
||||
take_screenshot = 1;
|
||||
}
|
||||
else if (ID_RANGE("IDM_SCREENSHOT_FORMAT[start]", "IDM_SCREENSHOT_FORMAT[end]"))
|
||||
{
|
||||
int format = wParam - wx_xrcid("IDM_SCREENSHOT_FORMAT[start]");
|
||||
if (format == 0)
|
||||
strcpy(screenshot_format, IMAGE_PNG);
|
||||
else if (format == 1)
|
||||
strcpy(screenshot_format, IMAGE_TIFF);
|
||||
else if (format == 2)
|
||||
strcpy(screenshot_format, IMAGE_BMP);
|
||||
else if (format == 3)
|
||||
strcpy(screenshot_format, IMAGE_JPG);
|
||||
saveconfig(NULL);
|
||||
wx_checkmenuitem(hmenu, wParam, WX_MB_CHECKED);
|
||||
}
|
||||
else if (ID_IS("IDM_SCREENSHOT_FLASH"))
|
||||
{
|
||||
screenshot_flash = !screenshot_flash;
|
||||
wx_checkmenuitem(hmenu, wParam, screenshot_flash);
|
||||
saveconfig(NULL);
|
||||
}
|
||||
else if (ID_IS("IDM_VID_REMEMBER"))
|
||||
{
|
||||
window_remember = checked;
|
||||
window_remember = !window_remember;
|
||||
wx_checkmenuitem(hmenu, WX_ID("IDM_VID_REMEMBER"),
|
||||
window_remember ? WX_MB_CHECKED : WX_MB_UNCHECKED);
|
||||
window_doremember = 1;
|
||||
|
|
@ -722,7 +862,8 @@ int wx_handle_command(void* hwnd, int wParam, int checked)
|
|||
"Use CTRL + ALT + PAGE DOWN to return to windowed mode",
|
||||
"PCem", WX_MB_OK);
|
||||
}
|
||||
video_fullscreen = checked;
|
||||
video_fullscreen = !video_fullscreen;
|
||||
wx_checkmenuitem(hmenu, wParam, video_fullscreen);
|
||||
saveconfig(NULL);
|
||||
}
|
||||
else if (ID_IS("IDM_VID_FULLSCREEN_TOGGLE"))
|
||||
|
|
@ -732,45 +873,94 @@ int wx_handle_command(void* hwnd, int wParam, int checked)
|
|||
else if (ID_RANGE("IDM_VID_FS[start]", "IDM_VID_FS[end]"))
|
||||
{
|
||||
video_fullscreen_scale = wParam - wx_xrcid("IDM_VID_FS[start]");
|
||||
display_resize(video_width, video_height);
|
||||
wx_checkmenuitem(hmenu, wParam, WX_MB_CHECKED);
|
||||
saveconfig(NULL);
|
||||
}
|
||||
else if (ID_RANGE("IDM_VID_SCALE_MODE[start]", "IDM_VID_SCALE_MODE[end]"))
|
||||
{
|
||||
video_scale_mode = wParam - wx_xrcid("IDM_VID_SCALE_MODE[start]");
|
||||
renderer_doreset = 1;
|
||||
wx_checkmenuitem(hmenu, wParam, WX_MB_CHECKED);
|
||||
saveconfig(NULL);
|
||||
}
|
||||
else if (ID_RANGE("IDM_VID_SCALE[start]", "IDM_VID_SCALE[end]"))
|
||||
{
|
||||
video_scale = wParam - wx_xrcid("IDM_VID_SCALE[start]");
|
||||
wx_checkmenuitem(hmenu, wParam, WX_MB_CHECKED);
|
||||
display_resize(video_width, video_height);
|
||||
saveconfig(NULL);
|
||||
}
|
||||
else if (ID_RANGE("IDM_VID_FS_MODE[start]", "IDM_VID_FS_MODE[end]"))
|
||||
{
|
||||
video_fullscreen_mode = wParam - wx_xrcid("IDM_VID_FS_MODE[start]");
|
||||
wx_checkmenuitem(hmenu, wParam, WX_MB_CHECKED);
|
||||
saveconfig(NULL);
|
||||
}
|
||||
else if (ID_RANGE("IDM_VID_RENDER_DRIVER[start]", "IDM_VID_RENDER_DRIVER[end]"))
|
||||
{
|
||||
requested_render_driver = sdl_get_render_driver_by_id(wParam - wx_xrcid("IDM_VID_RENDER_DRIVER[start]"), RENDERER_AUTO);
|
||||
window_doreset = 1;
|
||||
|
||||
/* update enabled menu-items */
|
||||
// wx_enablemenuitem(menu, WX_ID("IDM_VID_SDL2"), requested_render_driver.id != RENDERER_GL3);
|
||||
wx_enablemenuitem(menu, WX_ID("IDM_VID_GL3"), requested_render_driver.id == RENDERER_GL3);
|
||||
|
||||
wx_checkmenuitem(hmenu, wParam, WX_MB_CHECKED);
|
||||
saveconfig(NULL);
|
||||
}
|
||||
else if (ID_IS("IDM_VID_VSYNC"))
|
||||
{
|
||||
video_vsync = checked;
|
||||
video_vsync = !video_vsync;
|
||||
wx_checkmenuitem(menu, wParam, video_vsync);
|
||||
renderer_doreset = 1;
|
||||
saveconfig(NULL);
|
||||
}
|
||||
else if (ID_IS("IDM_VID_LOST_FOCUS_DIM"))
|
||||
{
|
||||
video_focus_dim = checked;
|
||||
video_focus_dim = !video_focus_dim;
|
||||
wx_checkmenuitem(menu, wParam, video_focus_dim);
|
||||
saveconfig(NULL);
|
||||
}
|
||||
else if (ID_RANGE("IDM_VID_GL3_INPUT_STRETCH[start]", "IDM_VID_GL3_INPUT_STRETCH[end]"))
|
||||
{
|
||||
gl3_input_stretch = wParam - wx_xrcid("IDM_VID_GL3_INPUT_STRETCH[start]");
|
||||
wx_checkmenuitem(menu, wParam, WX_MB_CHECKED);
|
||||
saveconfig(NULL);
|
||||
}
|
||||
else if (ID_RANGE("IDM_VID_GL3_INPUT_SCALE[start]", "IDM_VID_GL3_INPUT_SCALE[end]"))
|
||||
{
|
||||
int input_scale = wParam - wx_xrcid("IDM_VID_GL3_INPUT_SCALE[start]");
|
||||
gl3_input_scale = input_scale/2.0f+0.5f;
|
||||
wx_checkmenuitem(menu, wParam, WX_MB_CHECKED);
|
||||
saveconfig(NULL);
|
||||
}
|
||||
else if (ID_RANGE("IDM_VID_GL3_SHADER_REFRESH_RATE[start]", "IDM_VID_GL3_SHADER_REFRESH_RATE[end]"))
|
||||
{
|
||||
gl3_shader_refresh_rate = wParam - wx_xrcid("IDM_VID_GL3_SHADER_REFRESH_RATE[start]");
|
||||
wx_checkmenuitem(menu, wParam, WX_MB_CHECKED);
|
||||
saveconfig(NULL);
|
||||
}
|
||||
else if (ID_IS("IDM_VID_GL3_SHADER_MANAGER"))
|
||||
{
|
||||
if (shader_manager_open(hwnd))
|
||||
{
|
||||
renderer_doreset = 1;
|
||||
saveconfig(NULL);
|
||||
}
|
||||
// if (!getfile(hwnd, "GLSL Shaders (*.glslp;*.glsl)|*.glslp;*.glsl|All files (*.*)|*.*", gl3_shader_file))
|
||||
// {
|
||||
// strncpy(gl3_shader_file, openfilestring, 511);
|
||||
// gl3_shader_file[511] = 0;
|
||||
// renderer_doreset = 1;
|
||||
// saveconfig(NULL);
|
||||
// }
|
||||
|
||||
}
|
||||
else if (ID_RANGE("IDM_SND_BUF[start]", "IDM_SND_BUF[end]"))
|
||||
{
|
||||
sound_buf_len = MIN_SND_BUF*1<<(wParam - wx_xrcid("IDM_SND_BUF[start]"));
|
||||
wx_checkmenuitem(menu, wParam, WX_MB_CHECKED);
|
||||
saveconfig(NULL);
|
||||
}
|
||||
else if (ID_IS("IDM_CDROM_DISABLED"))
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ extern "C" {
|
|||
void leave_fullscreen();
|
||||
int getfile(void* hwnd, char *f, char *fn);
|
||||
int getsfile(void* hwnd, char *f, char *fn, char *dir, char *ext);
|
||||
void screenshot_taken(unsigned char* rgb, int width, int height);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
@ -14,3 +15,4 @@ extern char openfilestring[260];
|
|||
|
||||
extern int pause;
|
||||
|
||||
extern int take_screenshot;
|
||||
|
|
|
|||
230
src/wx-shader_man.c
Normal file
|
|
@ -0,0 +1,230 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "wx-utils.h"
|
||||
#include "wx-display.h"
|
||||
#include "wx-glslp-parser.h"
|
||||
#include "wx-shaderconfig.h"
|
||||
#include "config.h"
|
||||
|
||||
#define MAX_USER_SHADERS 20
|
||||
|
||||
extern char *get_filename(char *s);
|
||||
|
||||
extern char gl3_shader_file[MAX_USER_SHADERS][512];
|
||||
static char shaders[MAX_USER_SHADERS][512];
|
||||
|
||||
void read_shader_config(glslp_t* shader)
|
||||
{
|
||||
char s[512];
|
||||
int i;
|
||||
char* name = shader->name;
|
||||
sprintf(s, "GL3 Shaders - %s", name);
|
||||
for (i = 0; i < shader->num_parameters; ++i)
|
||||
{
|
||||
struct parameter* param = &shader->parameters[i];
|
||||
param->value = config_get_float(CFG_MACHINE, s, param->id, param->default_value);
|
||||
}
|
||||
}
|
||||
|
||||
void write_shader_config(glslp_t* shader)
|
||||
{
|
||||
char s[512];
|
||||
int i;
|
||||
char* name = shader->name;
|
||||
sprintf(s, "GL3 Shaders - %s", name);
|
||||
for (i = 0; i < shader->num_parameters; ++i)
|
||||
{
|
||||
struct parameter* param = &shader->parameters[i];
|
||||
config_set_float(CFG_MACHINE, s, param->id, param->value);
|
||||
}
|
||||
}
|
||||
|
||||
static void add_shader(int p, const char* s)
|
||||
{
|
||||
memmove(&shaders[p+1], &shaders[p], (MAX_USER_SHADERS-p-2)*512);
|
||||
strcpy(shaders[p], s);
|
||||
}
|
||||
|
||||
static int shader_list_update(void* hdlg)
|
||||
{
|
||||
char s[512];
|
||||
int c;
|
||||
void* h;
|
||||
int num = 0;
|
||||
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_LIST"));
|
||||
wx_sendmessage(h, WX_LB_RESETCONTENT, 0, 0);
|
||||
|
||||
for (c = 0; c < MAX_USER_SHADERS; c++)
|
||||
{
|
||||
if (strlen(shaders[c]))
|
||||
{
|
||||
char* p = get_filename(shaders[c]);
|
||||
wx_sendmessage(h, WX_LB_INSERTSTRING, c, (LONG_PARAM)p);
|
||||
++num;
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
static void set_shaders()
|
||||
{
|
||||
int i, j, available;
|
||||
char s[128];
|
||||
char name[64];
|
||||
for (i = 0; i < MAX_USER_SHADERS; ++i)
|
||||
{
|
||||
if (strlen(gl3_shader_file[i]))
|
||||
{
|
||||
available = 0;
|
||||
for (j = 0; j < MAX_USER_SHADERS; ++j)
|
||||
{
|
||||
if (!strcmp(gl3_shader_file[i], shaders[j]))
|
||||
{
|
||||
available = 1;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (!available)
|
||||
{
|
||||
get_glslp_name(gl3_shader_file[i], name, sizeof(name));
|
||||
sprintf(s, "GL3 Shaders - %s", name);
|
||||
config_free_section(CFG_MACHINE, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
memcpy(&gl3_shader_file, &shaders, sizeof(gl3_shader_file));
|
||||
|
||||
}
|
||||
|
||||
static int shader_manager_dlgproc(void* hdlg, int message, INT_PARAM wParam, LONG_PARAM lParam)
|
||||
{
|
||||
char s[512];
|
||||
switch (message)
|
||||
{
|
||||
case WX_INITDIALOG:
|
||||
{
|
||||
void* h = wx_getdlgitem(hdlg, WX_ID("IDC_LIST"));
|
||||
memcpy(&shaders, &gl3_shader_file, sizeof(gl3_shader_file));
|
||||
int len = shader_list_update(hdlg);
|
||||
if (len)
|
||||
wx_sendmessage(h, WX_LB_SETCURSEL, len-1, 0);
|
||||
return TRUE;
|
||||
}
|
||||
case WX_COMMAND:
|
||||
{
|
||||
if (wParam == wxID_OK)
|
||||
{
|
||||
set_shaders();
|
||||
wx_enddialog(hdlg, 1);
|
||||
return TRUE;
|
||||
}
|
||||
else if (wParam == wxID_CANCEL)
|
||||
{
|
||||
wx_enddialog(hdlg, 0);
|
||||
return TRUE;
|
||||
}
|
||||
else if (wParam == WX_ID("IDC_APPLY"))
|
||||
{
|
||||
set_shaders();
|
||||
renderer_doreset = 1;
|
||||
return TRUE;
|
||||
}
|
||||
else if (wParam == WX_ID("IDC_ADD"))
|
||||
{
|
||||
void* h = wx_getdlgitem(hdlg, WX_ID("IDC_LIST"));
|
||||
int c = wx_sendmessage(h, WX_LB_GETCURSEL, 0, 0);
|
||||
int count = wx_sendmessage(h, WX_LB_GETCOUNT, 0, 0);
|
||||
if (count >= MAX_USER_SHADERS)
|
||||
{
|
||||
wx_simple_messagebox("Error", "Can't add more shaders.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int ret = !wx_filedialog(hdlg, "Open", shaders[c], "GLSL Shaders (*.glslp;*.glsl)|*.glslp;*.glsl|All files (*.*)|*.*", 0, 1, s);
|
||||
|
||||
if (ret)
|
||||
{
|
||||
add_shader(c+1, s);
|
||||
shader_list_update(hdlg);
|
||||
wx_sendmessage(h, WX_LB_SETCURSEL, c+1, 0);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else if (wParam == WX_ID("IDC_CONFIG"))
|
||||
{
|
||||
void* h = wx_getdlgitem(hdlg, WX_ID("IDC_LIST"));
|
||||
int c = wx_sendmessage(h, WX_LB_GETCURSEL, 0, 0);
|
||||
if (c >= 0)
|
||||
{
|
||||
glslp_t* glsl = glslp_parse(shaders[c]);
|
||||
if (glsl)
|
||||
{
|
||||
read_shader_config(glsl);
|
||||
shaderconfig_open(hdlg, glsl);
|
||||
write_shader_config(glsl);
|
||||
glslp_free(glsl);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
else if (wParam == WX_ID("IDC_REMOVE"))
|
||||
{
|
||||
char name[64];
|
||||
void* h;
|
||||
int c;
|
||||
h = wx_getdlgitem(hdlg, WX_ID("IDC_LIST"));
|
||||
c = wx_sendmessage(h, WX_LB_GETCURSEL, 0, 0);
|
||||
if (c >= 0)
|
||||
{
|
||||
memmove(&shaders[c], &shaders[c+1], (MAX_USER_SHADERS-c-1)*512);
|
||||
int len = shader_list_update(hdlg);
|
||||
if (len > 0)
|
||||
{
|
||||
if (c > 0)
|
||||
c--;
|
||||
wx_sendmessage(h, WX_LB_SETCURSEL, c, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (wParam == WX_ID("IDC_MOVE_UP"))
|
||||
{
|
||||
void* h = wx_getdlgitem(hdlg, WX_ID("IDC_LIST"));
|
||||
int c = wx_sendmessage(h, WX_LB_GETCURSEL, 0, 0);
|
||||
if (c > 0)
|
||||
{
|
||||
strcpy(s, shaders[c-1]);
|
||||
strcpy(shaders[c-1], shaders[c]);
|
||||
strcpy(shaders[c], s);
|
||||
shader_list_update(hdlg);
|
||||
wx_sendmessage(h, WX_LB_SETCURSEL, c-1, 0);
|
||||
}
|
||||
}
|
||||
else if (wParam == WX_ID("IDC_MOVE_DOWN"))
|
||||
{
|
||||
void* h = wx_getdlgitem(hdlg, WX_ID("IDC_LIST"));
|
||||
int c = wx_sendmessage(h, WX_LB_GETCURSEL, 0, 0);
|
||||
if (c < MAX_USER_SHADERS-1)
|
||||
{
|
||||
if (strlen(shaders[c+1]))
|
||||
{
|
||||
strcpy(s, shaders[c+1]);
|
||||
strcpy(shaders[c+1], shaders[c]);
|
||||
strcpy(shaders[c], s);
|
||||
shader_list_update(hdlg);
|
||||
wx_sendmessage(h, WX_LB_SETCURSEL, c+1, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int shader_manager_open(void* hwnd)
|
||||
{
|
||||
return wx_dialogbox(hwnd, "ShaderManagerDlg", shader_manager_dlgproc);
|
||||
}
|
||||
146
src/wx-shaderconfig.cc
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
#include "wx-utils.h"
|
||||
#include <wx/wxprec.h>
|
||||
|
||||
#include "wx-dialogbox.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <wx/wx.h>
|
||||
#endif
|
||||
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/spinctrl.h>
|
||||
|
||||
#include "wx-glslp-parser.h"
|
||||
#include "wx-shaderconfig.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "config.h"
|
||||
void saveconfig(char*);
|
||||
void resetpchard();
|
||||
int deviceconfig_dlgproc(void* hdlg, int message, INT_PARAM wParam, LONG_PARAM lParam);
|
||||
void write_shader_config(glslp_t* shader);
|
||||
struct glslp_t* current_glsl;
|
||||
int confirm();
|
||||
}
|
||||
#define IDC_CONFIG_BASE 1000
|
||||
#define ID_APPLY 500
|
||||
#define ID_RESET 501
|
||||
extern int renderer_doreset;
|
||||
|
||||
static int shaderconfig_dlgproc(void* hdlg, int message, INT_PARAM wParam, LONG_PARAM lParam) {
|
||||
int i;
|
||||
switch (message) {
|
||||
case WX_INITDIALOG: {
|
||||
return TRUE;
|
||||
}
|
||||
case WX_COMMAND:
|
||||
switch (wParam) {
|
||||
case ID_APPLY: {
|
||||
for (i = 0; i < current_glsl->num_parameters; ++i)
|
||||
{
|
||||
struct parameter* p = ¤t_glsl->parameters[i];
|
||||
wxSpinCtrlDouble* h = (wxSpinCtrlDouble*)wx_getdlgitem(hdlg, IDC_CONFIG_BASE+i);
|
||||
p->value = (float)h->GetValue();
|
||||
}
|
||||
write_shader_config(current_glsl);
|
||||
renderer_doreset = 1;
|
||||
return TRUE;
|
||||
}
|
||||
case wxID_OK: {
|
||||
for (i = 0; i < current_glsl->num_parameters; ++i)
|
||||
{
|
||||
struct parameter* p = ¤t_glsl->parameters[i];
|
||||
wxSpinCtrlDouble* h = (wxSpinCtrlDouble*)wx_getdlgitem(hdlg, IDC_CONFIG_BASE+i);
|
||||
p->value = (float)h->GetValue();
|
||||
}
|
||||
write_shader_config(current_glsl);
|
||||
renderer_doreset = 1;
|
||||
wx_enddialog(hdlg, 0);
|
||||
return TRUE;
|
||||
}
|
||||
case wxID_CANCEL:
|
||||
wx_enddialog(hdlg, 0);
|
||||
return TRUE;
|
||||
case ID_RESET: {
|
||||
for (i = 0; i < current_glsl->num_parameters; ++i)
|
||||
{
|
||||
struct parameter* p = ¤t_glsl->parameters[i];
|
||||
wxSpinCtrlDouble* h = (wxSpinCtrlDouble*)wx_getdlgitem(hdlg, IDC_CONFIG_BASE+i);
|
||||
h->SetValue(p->default_value);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void shaderconfig_open(void* hwnd, struct glslp_t* glsl) {
|
||||
int i;
|
||||
current_glsl = glsl;
|
||||
|
||||
PCemDialogBox dialog((wxWindow*) hwnd, shaderconfig_dlgproc);
|
||||
// dialog.SetWindowStyle(wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
|
||||
|
||||
dialog.SetTitle("Shader Configuration");
|
||||
|
||||
wxBoxSizer* root = new wxBoxSizer(wxVERTICAL);
|
||||
dialog.SetSizer(root);
|
||||
|
||||
wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
|
||||
root->Add(sizer, 0, wxALL, 5);
|
||||
|
||||
wxPanel* panel = new wxPanel(&dialog, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL | wxBORDER_SUNKEN);
|
||||
sizer->Add(panel);
|
||||
|
||||
wxBoxSizer* panelSizer = new wxBoxSizer(wxVERTICAL);
|
||||
panel->SetSizer(panelSizer);
|
||||
|
||||
wxScrolledWindow* win = new wxScrolledWindow(panel, wxID_ANY, wxDefaultPosition, wxSize(300, 350), wxHSCROLL|wxVSCROLL);
|
||||
win->SetScrollRate( 5, 5 );
|
||||
panelSizer->Add(win, 1, wxEXPAND | wxALL, 5);
|
||||
|
||||
wxBoxSizer* winSizer = new wxBoxSizer(wxVERTICAL);
|
||||
win->SetSizer(winSizer);
|
||||
|
||||
if (glsl->num_parameters > 0)
|
||||
{
|
||||
wxPanel* scrollPanel = new wxPanel(win);
|
||||
winSizer->Add(scrollPanel);
|
||||
|
||||
wxBoxSizer* scollPanelSizer = new wxBoxSizer(wxVERTICAL);
|
||||
scrollPanel->SetSizer(scollPanelSizer);
|
||||
|
||||
for (i = 0; i < glsl->num_parameters; ++i)
|
||||
{
|
||||
struct parameter* p = &glsl->parameters[i];
|
||||
scollPanelSizer->Add(new wxStaticText(scrollPanel, wxID_ANY, p->description), 0, wxALL);
|
||||
wxSpinCtrlDouble* spin = new wxSpinCtrlDouble(scrollPanel, IDC_CONFIG_BASE+i);
|
||||
spin->SetRange(p->min, p->max);
|
||||
spin->SetIncrement(p->step);
|
||||
spin->SetValue(p->value);
|
||||
spin->SetDigits(2);
|
||||
|
||||
scollPanelSizer->Add(spin, 0, wxALL);
|
||||
}
|
||||
}
|
||||
else
|
||||
winSizer->Add(new wxStaticText(win, wxID_ANY, "No configuration available."), 0, wxALL);
|
||||
|
||||
wxBoxSizer* buttonSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
buttonSizer->Add(new wxButton(&dialog, ID_APPLY, "Apply"));
|
||||
buttonSizer->Add(new wxButton(&dialog, wxID_OK));
|
||||
buttonSizer->Add(new wxButton(&dialog, wxID_CANCEL));
|
||||
buttonSizer->Add(new wxButton(&dialog, ID_RESET, "Reset"));
|
||||
|
||||
sizer->Add(buttonSizer);
|
||||
|
||||
dialog.Fit();
|
||||
dialog.OnInit();
|
||||
dialog.ShowModal();
|
||||
dialog.Destroy();
|
||||
}
|
||||
13
src/wx-shaderconfig.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#ifndef SRC_WX_SHADERCONFIG_H_
|
||||
#define SRC_WX_SHADERCONFIG_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void shaderconfig_open(void* hwnd, struct glslp_t* glsl);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* SRC_WX_SHADERCONFIG_H_ */
|
||||
|
|
@ -322,8 +322,8 @@ void StatusFrame::OnCommand(wxCommandEvent& event)
|
|||
show_mount_paths = event.IsChecked();
|
||||
else if (event.GetId() == XRCID("IDM_SHOW_MACHINE_ON_START"))
|
||||
show_machine_on_start = event.IsChecked();
|
||||
else if (event.GetId() == XRCID("IDM_HDCONF"))
|
||||
hdconf_open(this);
|
||||
// else if (event.GetId() == XRCID("IDM_HDCONF"))
|
||||
// hdconf_open(this);
|
||||
else if (event.GetId() == XRCID("IDM_CONFIG"))
|
||||
config_open(this);
|
||||
else if (event.GetId() == XRCID("IDM_RESET_CONFIRMATION_DIALOGS"))
|
||||
|
|
@ -345,7 +345,7 @@ void StatusFrame::OnCommand(wxCommandEvent& event)
|
|||
void StatusFrame::OnMoveWindow(wxMoveEvent& event)
|
||||
{
|
||||
if (window_remember) {
|
||||
wx_window_x = event.GetPosition().x;
|
||||
wx_window_y = event.GetPosition().y;
|
||||
wx_window_x = GetScreenPosition().x;
|
||||
wx_window_y = GetScreenPosition().y;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
301
src/wx-utils.cc
|
|
@ -8,12 +8,20 @@
|
|||
#include <wx/spinctrl.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/stdpaths.h>
|
||||
#include <wx/fileconf.h>
|
||||
#include <wx/wfstream.h>
|
||||
#include <wx/progdlg.h>
|
||||
|
||||
#include "wx-dialogbox.h"
|
||||
#include "wx-app.h"
|
||||
#include "wx-common.h"
|
||||
#include "wx-status.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "thread.h"
|
||||
}
|
||||
|
||||
int confirm()
|
||||
{
|
||||
if (emulation_state != EMULATION_STOPPED) {
|
||||
|
|
@ -24,10 +32,22 @@ int confirm()
|
|||
|
||||
int wx_messagebox(void* window, const char* message, const char* title = NULL, int style = 5)
|
||||
{
|
||||
return wxMessageBox(message, title, style | wxCENTRE, (wxWindow*) window);
|
||||
return wxMessageBox(message, title, style | wxCENTRE | wxSTAY_ON_TOP, (wxWindow*) window);
|
||||
}
|
||||
|
||||
int wx_textentrydialog(void* window, const char* message, const char* title, const char* value, int min_length, int max_length, LONG_PARAM result)
|
||||
void wx_simple_messagebox(const char* title, const char *format, ...)
|
||||
{
|
||||
char message[2048];
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
vsnprintf(message, 2047, format, ap);
|
||||
message[2047] = 0;
|
||||
va_end(ap);
|
||||
wx_messagebox(0, message, title, WX_MB_OK);
|
||||
}
|
||||
|
||||
|
||||
int wx_textentrydialog(void* window, const char* message, const char* title, const char* value, unsigned int min_length, unsigned int max_length, LONG_PARAM result)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
|
|
@ -39,7 +59,7 @@ int wx_textentrydialog(void* window, const char* message, const char* title, con
|
|||
wxString value = dlg.GetValue();
|
||||
if (value.Length() >= min_length)
|
||||
{
|
||||
strcpy((char*)result, value);
|
||||
strcpy((char*)result, value.mb_str());
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
@ -63,7 +83,7 @@ int wx_filedialog(void* window, const char* title, const char* path,
|
|||
const char* extensions, const char* extension, int open, char* file)
|
||||
{
|
||||
wxFileDialog dlg((wxWindow*) window, title, "", path, extensions,
|
||||
open ? wxFD_OPEN : wxFD_SAVE);
|
||||
open ? (wxFD_OPEN | wxFD_FILE_MUST_EXIST) : (wxFD_SAVE | wxFD_OVERWRITE_PROMPT));
|
||||
if (dlg.ShowModal() == wxID_OK)
|
||||
{
|
||||
wxString p = dlg.GetPath();
|
||||
|
|
@ -74,10 +94,10 @@ int wx_filedialog(void* window, const char* title, const char* path,
|
|||
if (!p.EndsWith("."))
|
||||
p += ".";
|
||||
p += extension;
|
||||
strcpy(file, p);
|
||||
strcpy(file, p.mb_str());
|
||||
}
|
||||
else
|
||||
strcpy(file, p);
|
||||
strcpy(file, p.mb_str());
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
|
|
@ -120,6 +140,30 @@ void* wx_getsubmenu(void* menu, int id)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void* wx_getnativemenu(void* menu)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return ((wxMenu*)menu)->GetHMenu();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
void* wx_getnativewindow(void* window)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return ((wxWindow*)window)->GetHWND();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
void wx_winsendmessage(void* window, int msg, INT_PARAM wParam, LONG_PARAM lParam)
|
||||
{
|
||||
WinSendMessageEvent* event = new WinSendMessageEvent(wx_getnativewindow(window), msg, wParam, lParam);
|
||||
wxQueueEvent((wxWindow*)window, event);
|
||||
}
|
||||
#endif
|
||||
|
||||
void wx_appendmenu(void* sub_menu, int id, const char* title, enum wxItemKind type)
|
||||
{
|
||||
((wxMenu*) sub_menu)->Append(id, title, wxEmptyString, type);
|
||||
|
|
@ -173,14 +217,19 @@ void wx_showwindow(void* window, int show)
|
|||
wxQueueEvent((wxWindow*)window, event);
|
||||
}
|
||||
|
||||
int wx_iswindowvisible(void* window)
|
||||
{
|
||||
return ((wxWindow*) window)->IsShown();
|
||||
}
|
||||
|
||||
void wx_togglewindow(void* window)
|
||||
{
|
||||
wx_showwindow(window, -1);
|
||||
}
|
||||
|
||||
void wx_callback(void* window, WX_CALLBACK callback)
|
||||
void wx_callback(void* window, WX_CALLBACK callback, void* data)
|
||||
{
|
||||
CallbackEvent* event = new CallbackEvent(callback);
|
||||
CallbackEvent* event = new CallbackEvent(callback, data);
|
||||
wxQueueEvent((wxWindow*)window, event);
|
||||
}
|
||||
|
||||
|
|
@ -231,17 +280,19 @@ int wx_sendmessage(void* window, int type, INT_PARAM param1, LONG_PARAM param2)
|
|||
((wxComboBox*) window)->Append((char*) param2);
|
||||
break;
|
||||
case WX_CB_SETCURSEL:
|
||||
((wxComboBox*) window)->Select(param1);
|
||||
if (param1 >= 0 && param1 < ((wxComboBox*) window)->GetCount())
|
||||
((wxComboBox*) window)->Select(param1);
|
||||
break;
|
||||
case WX_CB_GETCURSEL:
|
||||
return ((wxComboBox*) window)->GetCurrentSelection();
|
||||
break;
|
||||
case WX_CB_GETLBTEXT:
|
||||
strcpy((char*) param2, ((wxComboBox*) window)->GetString(param1));
|
||||
strcpy((char*) param2, ((wxComboBox*) window)->GetString(param1).mb_str());
|
||||
break;
|
||||
case WX_CB_RESETCONTENT:
|
||||
{
|
||||
#ifndef __WXOSX_MAC__
|
||||
((wxComboBox*) window)->SetValue("");
|
||||
((wxComboBox*) window)->Clear();
|
||||
#else
|
||||
/* Clear() does not work on OSX */
|
||||
|
|
@ -268,9 +319,9 @@ int wx_sendmessage(void* window, int type, INT_PARAM param1, LONG_PARAM param2)
|
|||
break;
|
||||
case WX_WM_GETTEXT:
|
||||
if (((wxWindow*) window)->GetClassInfo()->IsKindOf(CLASSINFO(wxTextCtrl)))
|
||||
strcpy((char*) param2, ((wxTextCtrl*) window)->GetValue());
|
||||
strcpy((char*) param2, ((wxTextCtrl*) window)->GetValue().mb_str());
|
||||
else
|
||||
strcpy((char*) param2, ((wxStaticText*) window)->GetLabel());
|
||||
strcpy((char*) param2, ((wxStaticText*) window)->GetLabel().mb_str());
|
||||
break;
|
||||
case WX_UDM_SETPOS:
|
||||
((wxSpinCtrl*) window)->SetValue(param2);
|
||||
|
|
@ -300,9 +351,14 @@ int wx_sendmessage(void* window, int type, INT_PARAM param1, LONG_PARAM param2)
|
|||
{
|
||||
return ((wxListBox*) window)->GetSelection();
|
||||
}
|
||||
case WX_LB_SETCURSEL:
|
||||
{
|
||||
((wxListBox*) window)->SetSelection(param1);
|
||||
break;
|
||||
}
|
||||
case WX_LB_GETTEXT:
|
||||
{
|
||||
strcpy((char*) param2, ((wxListBox*) window)->GetString(param1));
|
||||
strcpy((char*) param2, ((wxListBox*) window)->GetString(param1).mb_str());
|
||||
break;
|
||||
}
|
||||
case WX_LB_INSERTSTRING:
|
||||
|
|
@ -315,6 +371,11 @@ int wx_sendmessage(void* window, int type, INT_PARAM param1, LONG_PARAM param2)
|
|||
((wxListBox*) window)->Delete(param1);
|
||||
break;
|
||||
}
|
||||
case WX_LB_RESETCONTENT:
|
||||
{
|
||||
((wxListBox*) window)->Clear();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
((wxWindow*)window)->Fit();
|
||||
|
|
@ -447,7 +508,7 @@ void wx_get_home_directory(char* path)
|
|||
if (!home.EndsWith(wxFileName::GetPathSeparator())) {
|
||||
home.Append(wxFileName::GetPathSeparator());
|
||||
}
|
||||
strcpy(path, home);
|
||||
strcpy(path, home.mb_str());
|
||||
}
|
||||
|
||||
int wx_create_directory(char* path)
|
||||
|
|
@ -477,6 +538,11 @@ int wx_setup(char* path)
|
|||
if (!nvr.DirExists() && !nvr.Mkdir())
|
||||
return FALSE;
|
||||
|
||||
wxFileName screenshots(p);
|
||||
screenshots.AppendDir("screenshots");
|
||||
if (!screenshots.DirExists() && !screenshots.Mkdir())
|
||||
return FALSE;
|
||||
|
||||
wxFileName logs(p);
|
||||
logs.AppendDir("logs");
|
||||
if (!logs.DirExists() && !logs.Mkdir())
|
||||
|
|
@ -497,3 +563,210 @@ int wx_dir_exists(char* path)
|
|||
wxFileName p(path);
|
||||
return p.DirExists();
|
||||
}
|
||||
|
||||
int wx_image_save(const char* path, const char* name, const char* format, unsigned char* rgba, int width, int height, int alpha)
|
||||
{
|
||||
int x, y;
|
||||
wxLogNull logNull;
|
||||
wxImage image(width, height);
|
||||
if (alpha)
|
||||
{
|
||||
unsigned char* rgb = (unsigned char*)malloc(width*height*3);
|
||||
unsigned char* a = (unsigned char*)malloc(width*height);
|
||||
for (x = 0; x < width; ++x)
|
||||
{
|
||||
for (y = 0; y < height; ++y)
|
||||
{
|
||||
rgb[(y*width+x)*3+0] = rgba[(y*width+x)*4+0];
|
||||
rgb[(y*width+x)*3+1] = rgba[(y*width+x)*4+1];
|
||||
rgb[(y*width+x)*3+2] = rgba[(y*width+x)*4+2];
|
||||
a[y*width+x] = rgba[(y*width+x)*4+3];
|
||||
}
|
||||
}
|
||||
image.SetData(rgb);
|
||||
image.SetAlpha(a);
|
||||
}
|
||||
else
|
||||
image.SetData(rgba, true);
|
||||
|
||||
wxImageHandler* h;
|
||||
wxString ext;
|
||||
|
||||
if (!strcmp(format, IMAGE_TIFF))
|
||||
{
|
||||
h = new wxTIFFHandler();
|
||||
ext = "tif";
|
||||
}
|
||||
else if (!strcmp(format, IMAGE_BMP))
|
||||
{
|
||||
h = new wxBMPHandler();
|
||||
ext = "bmp";
|
||||
}
|
||||
else if (!strcmp(format, IMAGE_JPG))
|
||||
{
|
||||
h = new wxJPEGHandler();
|
||||
ext = "jpg";
|
||||
}
|
||||
else
|
||||
{
|
||||
h = new wxPNGHandler();
|
||||
ext = "png";
|
||||
}
|
||||
|
||||
int res = 0;
|
||||
if (h)
|
||||
{
|
||||
wxString p(path);
|
||||
if (!p.EndsWith("/"))
|
||||
p = p.Append("/");
|
||||
p = p.Append(name).Append(".").Append(ext);
|
||||
|
||||
wxFileOutputStream stream(p);
|
||||
res = h->SaveFile(&image, stream, false);
|
||||
delete h;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void* wx_image_load(const char* path)
|
||||
{
|
||||
wxLogNull logNull; /* removes sRGB-warnings on Windows */
|
||||
wxImage* image = new wxImage(path);
|
||||
if (image->IsOk())
|
||||
return image;
|
||||
delete image;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void wx_image_free(void* image)
|
||||
{
|
||||
delete (wxImage*)image;
|
||||
}
|
||||
|
||||
void wx_image_rescale(void* image, int width, int height)
|
||||
{
|
||||
((wxImage*)image)->Rescale(width, height);
|
||||
}
|
||||
|
||||
void wx_image_get_size(void* image, int* width, int* height)
|
||||
{
|
||||
*width = ((wxImage*)image)->GetWidth();
|
||||
*height = ((wxImage*)image)->GetHeight();
|
||||
}
|
||||
|
||||
unsigned char* wx_image_get_data(void* image)
|
||||
{
|
||||
return ((wxImage*)image)->GetData();
|
||||
}
|
||||
|
||||
unsigned char* wx_image_get_alpha(void* image)
|
||||
{
|
||||
return ((wxImage*)image)->GetAlpha();
|
||||
}
|
||||
|
||||
/* wxFileConfig */
|
||||
|
||||
void* wx_config_load(const char* path)
|
||||
{
|
||||
if (!wxFileExists(path))
|
||||
return 0;
|
||||
wxFileInputStream stream(path);
|
||||
if (stream.IsOk())
|
||||
return new wxFileConfig(stream);
|
||||
return 0;
|
||||
}
|
||||
int wx_config_get_string(void* config, const char* name, char* dst, int size, const char* defVal)
|
||||
{
|
||||
wxFileConfig* c = ((wxFileConfig*)config);
|
||||
wxString val;
|
||||
bool res = c->Read(name, &val, wxString(defVal));
|
||||
strncpy(dst, val.GetData().AsChar(), size-1);
|
||||
dst[size-1] = 0;
|
||||
return res;
|
||||
}
|
||||
int wx_config_get_int(void* config, const char* name, int* dst, int defVal)
|
||||
{
|
||||
wxFileConfig* c = ((wxFileConfig*)config);
|
||||
return c->Read(name, dst, defVal);
|
||||
}
|
||||
|
||||
int wx_config_get_float(void* config, const char* name, float* dst, float defVal)
|
||||
{
|
||||
wxFileConfig* c = ((wxFileConfig*)config);
|
||||
return c->Read(name, dst, defVal);
|
||||
|
||||
}
|
||||
|
||||
int wx_config_get_bool(void* config, const char* name, int* dst, int defVal)
|
||||
{
|
||||
wxFileConfig* c = ((wxFileConfig*)config);
|
||||
wxString val;
|
||||
bool res = 1;
|
||||
if (c->Read(name, &val))
|
||||
{
|
||||
val.LowerCase();
|
||||
if (val.StartsWith("true"))
|
||||
*dst = 1;
|
||||
else if (val.StartsWith("false"))
|
||||
*dst = 0;
|
||||
else
|
||||
res = 0;
|
||||
}
|
||||
if (!res)
|
||||
res = c->Read(name, (bool*)dst, (bool)defVal);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
int wx_config_has_entry(void* config, const char* name)
|
||||
{
|
||||
wxFileConfig* c = ((wxFileConfig*)config);
|
||||
return c->HasEntry(name);
|
||||
}
|
||||
|
||||
void wx_config_free(void* config)
|
||||
{
|
||||
delete (wxFileConfig*)config;
|
||||
}
|
||||
|
||||
typedef struct progress_data_t {
|
||||
WX_CALLBACK callback;
|
||||
void* data;
|
||||
int active;
|
||||
int result;
|
||||
} progress_data_t;
|
||||
|
||||
static void progress_callback(void* data)
|
||||
{
|
||||
progress_data_t* d = (progress_data_t*) data;
|
||||
d->result = d->callback(d->data);
|
||||
d->active = 0;
|
||||
}
|
||||
|
||||
int wx_progressdialogpulse(void* window, const char* title, const char* message, WX_CALLBACK callback, void* data)
|
||||
{
|
||||
struct progress_data_t pdata;
|
||||
pdata.callback = callback;
|
||||
pdata.data = data;
|
||||
pdata.active = 1;
|
||||
pdata.result = 0;
|
||||
|
||||
thread_t* t = thread_create(progress_callback, &pdata);
|
||||
|
||||
wxProgressDialog dlg(title, message, 100, (wxWindow*)window, wxPD_APP_MODAL | wxPD_SMOOTH | wxPD_AUTO_HIDE);
|
||||
while (pdata.active)
|
||||
{
|
||||
dlg.Pulse();
|
||||
wxMilliSleep(50);
|
||||
}
|
||||
thread_kill(t);
|
||||
|
||||
return pdata.result;
|
||||
}
|
||||
|
||||
void wx_date_format(char* s, const char* format)
|
||||
{
|
||||
wxString res = wxDateTime::Now().Format(format);
|
||||
strcpy(s, res.mb_str());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,12 +8,14 @@
|
|||
#define INT_PARAM wxInt32
|
||||
#endif
|
||||
|
||||
typedef void (*WX_CALLBACK)();
|
||||
typedef int (*WX_CALLBACK)(void* data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
int wx_messagebox(void* nothing, const char* message, const char* title, int style);
|
||||
void wx_simple_messagebox(const char* title, const char *format, ...);
|
||||
|
||||
int wx_xrcid(const char* s);
|
||||
int wx_filedialog(void* window, const char* title, const char* path, const char* extensions, const char* extension, int open, char* file);
|
||||
void wx_checkmenuitem(void* window, int id, int checked);
|
||||
|
|
@ -25,8 +27,9 @@ extern "C" {
|
|||
|
||||
void* wx_getsubmenu(void* window, int id);
|
||||
void wx_appendmenu(void* sub_menu, int id, const char* title, enum wxItemKind type);
|
||||
void* wx_getnativemenu(void* menu);
|
||||
|
||||
int wx_textentrydialog(void* window, const char* message, const char* title, const char* value, int min_length, int max_length, LONG_PARAM result);
|
||||
int wx_textentrydialog(void* window, const char* message, const char* title, const char* value, unsigned int min_length, unsigned int max_length, LONG_PARAM result);
|
||||
|
||||
int wx_dlgdirlist(void* window, const char* path, int id, int static_path, int file_type);
|
||||
int wx_dlgdirselectex(void* window, LONG_PARAM path, int count, int id);
|
||||
|
|
@ -37,8 +40,11 @@ extern "C" {
|
|||
void wx_setdlgitemtext(void* window, int id, char* str);
|
||||
void wx_enablewindow(void* window, int enabled);
|
||||
void wx_showwindow(void* window, int show);
|
||||
void wx_callback(void* window, WX_CALLBACK callback);
|
||||
int wx_iswindowvisible(void* window);
|
||||
void* wx_getnativewindow(void* window);
|
||||
void wx_callback(void* window, WX_CALLBACK callback, void* data);
|
||||
void wx_togglewindow(void* window);
|
||||
int wx_progressdialogpulse(void* window, const char* title, const char* message, WX_CALLBACK callback, void* data);
|
||||
|
||||
void wx_enddialog(void* window, int ret_code);
|
||||
|
||||
|
|
@ -72,7 +78,30 @@ extern "C" {
|
|||
int wx_file_exists(char* path);
|
||||
int wx_dir_exists(char* path);
|
||||
|
||||
void wx_date_format(char* s, const char* format);
|
||||
|
||||
int wx_image_save(const char* path, const char* name, const char* format, unsigned char* rgba, int width, int height, int alpha);
|
||||
|
||||
void* wx_image_load(const char* path);
|
||||
void wx_image_rescale(void* image, int width, int height);
|
||||
void wx_image_get_size(void* image, int* width, int* height);
|
||||
unsigned char* wx_image_get_data(void* image);
|
||||
unsigned char* wx_image_get_alpha(void* image);
|
||||
void wx_image_free(void* image);
|
||||
|
||||
void* wx_config_load(const char* path);
|
||||
int wx_config_get_string(void* config, const char* name, char* dst, int size, const char* defVal);
|
||||
int wx_config_get_int(void* config, const char* name, int* dst, int defVal);
|
||||
int wx_config_get_float(void* config, const char* name, float* dst, float defVal);
|
||||
int wx_config_get_bool(void* config, const char* name, int* dst, int defVal);
|
||||
int wx_config_has_entry(void* config, const char* name);
|
||||
void wx_config_free(void* config);
|
||||
|
||||
int confirm();
|
||||
|
||||
#ifdef _WIN32
|
||||
void wx_winsendmessage(void* window, int msg, INT_PARAM wParam, LONG_PARAM lParam);
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
@ -111,9 +140,17 @@ extern void (*wx_idle_func)(void* window, void* event);
|
|||
#define WX_LB_GETTEXT 62
|
||||
#define WX_LB_DELETESTRING 63
|
||||
#define WX_LB_INSERTSTRING 64
|
||||
#define WX_LB_RESETCONTENT 65
|
||||
#define WX_LB_SETCURSEL 66
|
||||
#define WX_LBN_DBLCLK 67
|
||||
|
||||
#define WX_MB_OK wxOK
|
||||
#define WX_MB_OKCANCEL wxOK|wxCANCEL
|
||||
#define WX_IDOK wxOK
|
||||
|
||||
#define IMAGE_JPG "jpg"
|
||||
#define IMAGE_PNG "png"
|
||||
#define IMAGE_BMP "bmp"
|
||||
#define IMAGE_TIFF "tiff"
|
||||
|
||||
extern int has_been_inited;
|
||||
|
|
|
|||
1
src/wx.rc
Normal file
|
|
@ -0,0 +1 @@
|
|||
#include "wx/msw/wx.rc"
|
||||