From f09a36b02da14044419fdc7c41538e5b866e5d53 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Fri, 26 Feb 2010 19:23:57 +0200 Subject: [PATCH] misc --- include/options.h | 1 - od-win32/dinput.cpp | 16 ++-- od-win32/win32.cpp | 3 - od-win32/win32.h | 4 +- p96_blit.cpp | 214 ++++++++++++++++++++++---------------------- 5 files changed, 119 insertions(+), 119 deletions(-) diff --git a/include/options.h b/include/options.h index 02231a66..4954b4ab 100644 --- a/include/options.h +++ b/include/options.h @@ -357,7 +357,6 @@ struct uae_prefs { int win32_specialkey; int win32_guikey; int win32_kbledmode; - int win32_fscodepage; TCHAR win32_commandpathstart[MAX_DPATH]; TCHAR win32_commandpathend[MAX_DPATH]; diff --git a/od-win32/dinput.cpp b/od-win32/dinput.cpp index 269b7bb1..d257c9b6 100644 --- a/od-win32/dinput.cpp +++ b/od-win32/dinput.cpp @@ -446,6 +446,7 @@ static int gettabletres (AXIS *a) void *open_tablet (HWND hwnd) { #ifndef _WIN64 + static int initialized; LOGCONTEXT lc; AXIS tx = { 0 }, ty = { 0 }, tz = { 0 }; AXIS pres = { 0 }; @@ -476,18 +477,21 @@ void *open_tablet (HWND hwnd) lc.lcInExtY = ty.axMax; if (zmax > 0) lc.lcInExtZ = tz.axMax; - write_log (L"Tablet '%s' parameters\n", tabletname); - write_log (L"Xmax=%d,Ymax=%d,Zmax=%d\n", xmax, ymax, zmax); - write_log (L"Xres=%.1f:%d,Yres=%.1f:%d,Zres=%.1f:%d\n", - tx.axResolution / 65536.0, tx.axUnits, ty.axResolution / 65536.0, ty.axUnits, tz.axResolution / 65536.0, tz.axUnits); - write_log (L"Xrotmax=%d,Yrotmax=%d,Zrotmax=%d\n", axmax, aymax, azmax); - write_log (L"PressureMin=%d,PressureMax=%d\n", pres.axMin, pres.axMax); + if (!initialized) { + write_log (L"Tablet '%s' parameters\n", tabletname); + write_log (L"Xmax=%d,Ymax=%d,Zmax=%d\n", xmax, ymax, zmax); + write_log (L"Xres=%.1f:%d,Yres=%.1f:%d,Zres=%.1f:%d\n", + tx.axResolution / 65536.0, tx.axUnits, ty.axResolution / 65536.0, ty.axUnits, tz.axResolution / 65536.0, tz.axUnits); + write_log (L"Xrotmax=%d,Yrotmax=%d,Zrotmax=%d\n", axmax, aymax, azmax); + write_log (L"PressureMin=%d,PressureMax=%d\n", pres.axMin, pres.axMax); + } maxpres = pres.axMax; xres = gettabletres (&tx); yres = gettabletres (&ty); tablet_proximity = -1; tablet_x = -1; inputdevice_tablet_info (xmax, ymax, zmax, axmax, aymax, azmax, xres, yres); + initialized = 1; return WTOpen (hwnd, &lc, TRUE); #else return 0; diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index e5732c6a..fa809256 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -2481,7 +2481,6 @@ void target_default_options (struct uae_prefs *p, int type) p->win32_rtgallowscaling = 0; p->win32_rtgscaleaspectratio = -1; p->win32_rtgvblankrate = 0; - p->win32_fscodepage = 0; p->win32_commandpathstart[0] = 0; p->win32_commandpathend[0] = 0; } @@ -2550,7 +2549,6 @@ void target_save_options (struct zfile *f, struct uae_prefs *p) cfgfile_target_dwrite (f, L"guikey", L"0x%x", p->win32_guikey); cfgfile_target_dwrite (f, L"kbledmode", L"%d", p->win32_kbledmode); cfgfile_target_dwrite_bool (f, L"powersavedisabled", p->win32_powersavedisabled); - cfgfile_target_dwrite (f, L"filesystem_codepage", L"%d", p->win32_fscodepage); cfgfile_target_dwrite_str (f, L"exec_before", p->win32_commandpathstart); cfgfile_target_dwrite_str (f, L"exec_after", p->win32_commandpathend); @@ -2606,7 +2604,6 @@ int target_parse_option (struct uae_prefs *p, TCHAR *option, TCHAR *value) || cfgfile_intval (option, value, L"specialkey", &p->win32_specialkey, 1) || cfgfile_intval (option, value, L"guikey", &p->win32_guikey, 1) || cfgfile_intval (option, value, L"kbledmode", &p->win32_kbledmode, 1) - || cfgfile_intval (option, value, L"filesystem_codepage", &p->win32_fscodepage, 1) || cfgfile_intval (option, value, L"cpu_idle", &p->cpu_idle, 1)); if (cfgfile_yesno (option, value, L"rtg_match_depth", &p->win32_rtgmatchdepth)) diff --git a/od-win32/win32.h b/od-win32/win32.h index 30842b90..f88533f4 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -18,8 +18,8 @@ #define WINUAEPUBLICBETA 1 #define LANG_DLL 1 -#define WINUAEBETA L"12" -#define WINUAEDATE MAKEBD(2010, 2, 20) +#define WINUAEBETA L"13" +#define WINUAEDATE MAKEBD(2010, 2, 26) #define WINUAEEXTRA L"" #define WINUAEREV L"" diff --git a/p96_blit.cpp b/p96_blit.cpp index 5aaf1d27..d6d43c85 100644 --- a/p96_blit.cpp +++ b/p96_blit.cpp @@ -2,136 +2,136 @@ #if BLT_SIZE == 3 static void NOINLINE BLT_NAME (unsigned int w, unsigned int h, uae_u8 *src, uae_u8 *dst, int srcpitch, int dstpitch) { - uae_u8 *src2 = src; - uae_u8 *dst2 = dst; - uae_u32 *src2_32 = (uae_u32*)src; - uae_u32 *dst2_32 = (uae_u32*)dst; - unsigned int y, x, ww, xxd; + uae_u8 *src2 = src; + uae_u8 *dst2 = dst; + uae_u32 *src2_32 = (uae_u32*)src; + uae_u32 *dst2_32 = (uae_u32*)dst; + unsigned int y, x, ww, xxd; #ifdef BLT_TEMP - uae_u32 tmp; + uae_u32 tmp; #endif - w *= BLT_SIZE; - ww = w / 4; - xxd = w - (ww * 4); - for(y = 0; y < h; y++) { - uae_u8 *src_8; - uae_u8 *dst_8; - uae_u32 *src_32 = (uae_u32*)src2; - uae_u32 *dst_32 = (uae_u32*)dst2; - for (x = 0; x < ww; x++) { - BLT_FUNC (src_32, dst_32); - src_32++; dst_32++; - } - src_8 = (uae_u8*)src_32; - dst_8 = (uae_u8*)dst_32; - for (x = 0; x < xxd; x++) { - BLT_FUNC (src_8, dst_8); - src_8++; - dst_8++; + w *= BLT_SIZE; + ww = w / 4; + xxd = w - (ww * 4); + for(y = 0; y < h; y++) { + uae_u8 *src_8; + uae_u8 *dst_8; + uae_u32 *src_32 = (uae_u32*)src2; + uae_u32 *dst_32 = (uae_u32*)dst2; + for (x = 0; x < ww; x++) { + BLT_FUNC (src_32, dst_32); + src_32++; dst_32++; + } + src_8 = (uae_u8*)src_32; + dst_8 = (uae_u8*)dst_32; + for (x = 0; x < xxd; x++) { + BLT_FUNC (src_8, dst_8); + src_8++; + dst_8++; + } + dst2 += dstpitch; + src2 += srcpitch; } - dst2 += dstpitch; - src2 += srcpitch; - } } #else static void NOINLINE BLT_NAME (unsigned int w, unsigned int h, uae_u8 *src, uae_u8 *dst, int srcpitch, int dstpitch) { - uae_u8 *src2 = src; - uae_u8 *dst2 = dst; - uae_u32 *src2_32 = (uae_u32*)src; - uae_u32 *dst2_32 = (uae_u32*)dst; - unsigned int y, x, ww, xxd; + uae_u8 *src2 = src; + uae_u8 *dst2 = dst; + uae_u32 *src2_32 = (uae_u32*)src; + uae_u32 *dst2_32 = (uae_u32*)dst; + unsigned int y, x, ww, xxd; #ifdef BLT_TEMP #if BLT_SIZE == 4 - uae_u32 tmp; + uae_u32 tmp; #elif BLT_SIZE == 2 - uae_u16 tmp; + uae_u16 tmp; #else - uae_u8 tmp; + uae_u8 tmp; #endif #endif - if (w < 8 * BLT_MULT) { - ww = w / BLT_MULT; - for(y = 0; y < h; y++) { - uae_u32 *src_32 = (uae_u32*)src2; - uae_u32 *dst_32 = (uae_u32*)dst2; - for (x = 0; x < ww; x++) { - BLT_FUNC (src_32, dst_32); - src_32++; dst_32++; - } + if (w < 8 * BLT_MULT) { + ww = w / BLT_MULT; + for(y = 0; y < h; y++) { + uae_u32 *src_32 = (uae_u32*)src2; + uae_u32 *dst_32 = (uae_u32*)dst2; + for (x = 0; x < ww; x++) { + BLT_FUNC (src_32, dst_32); + src_32++; dst_32++; + } #if BLT_SIZE == 2 - if (w & 1) { - uae_u16 *src_16 = (uae_u16*)src_32; - uae_u16 *dst_16 = (uae_u16*)dst_32; - BLT_FUNC (src_16, dst_16); - } + if (w & 1) { + uae_u16 *src_16 = (uae_u16*)src_32; + uae_u16 *dst_16 = (uae_u16*)dst_32; + BLT_FUNC (src_16, dst_16); + } #elif BLT_SIZE == 1 - { - int wb = w & 3; - uae_u8 *src_8 = (uae_u8*)src_32; - uae_u8 *dst_8 = (uae_u8*)dst_32; - while (wb--) { - BLT_FUNC (src_8, dst_8); - src_8++; - dst_8++; - } - } + { + int wb = w & 3; + uae_u8 *src_8 = (uae_u8*)src_32; + uae_u8 *dst_8 = (uae_u8*)dst_32; + while (wb--) { + BLT_FUNC (src_8, dst_8); + src_8++; + dst_8++; + } + } #endif - dst2 += dstpitch; - src2 += srcpitch; + dst2 += dstpitch; + src2 += srcpitch; + } + return; } - return; - } - ww = w / (8 * BLT_MULT); - xxd = (w - ww * (8 * BLT_MULT)) / BLT_MULT; - for(y = 0; y < h; y++) { - uae_u32 *src_32 = (uae_u32*)src2; - uae_u32 *dst_32 = (uae_u32*)dst2; - for (x = 0; x < ww; x++) { - BLT_FUNC (src_32, dst_32); - src_32++; dst_32++; - BLT_FUNC (src_32, dst_32); - src_32++; dst_32++; - BLT_FUNC (src_32, dst_32); - src_32++; dst_32++; - BLT_FUNC (src_32, dst_32); - src_32++; dst_32++; - BLT_FUNC (src_32, dst_32); - src_32++; dst_32++; - BLT_FUNC (src_32, dst_32); - src_32++; dst_32++; - BLT_FUNC (src_32, dst_32); - src_32++; dst_32++; - BLT_FUNC (src_32, dst_32); - src_32++; dst_32++; - } - for (x = 0; x < xxd; x++) { - BLT_FUNC (src_32, dst_32); - src_32++; dst_32++; - } + ww = w / (8 * BLT_MULT); + xxd = (w - ww * (8 * BLT_MULT)) / BLT_MULT; + for(y = 0; y < h; y++) { + uae_u32 *src_32 = (uae_u32*)src2; + uae_u32 *dst_32 = (uae_u32*)dst2; + for (x = 0; x < ww; x++) { + BLT_FUNC (src_32, dst_32); + src_32++; dst_32++; + BLT_FUNC (src_32, dst_32); + src_32++; dst_32++; + BLT_FUNC (src_32, dst_32); + src_32++; dst_32++; + BLT_FUNC (src_32, dst_32); + src_32++; dst_32++; + BLT_FUNC (src_32, dst_32); + src_32++; dst_32++; + BLT_FUNC (src_32, dst_32); + src_32++; dst_32++; + BLT_FUNC (src_32, dst_32); + src_32++; dst_32++; + BLT_FUNC (src_32, dst_32); + src_32++; dst_32++; + } + for (x = 0; x < xxd; x++) { + BLT_FUNC (src_32, dst_32); + src_32++; dst_32++; + } #if BLT_SIZE == 2 - if (w & 1) { - uae_u16 *src_16 = (uae_u16*)src_32; - uae_u16 *dst_16 = (uae_u16*)dst_32; - BLT_FUNC (src_16, dst_16); - } + if (w & 1) { + uae_u16 *src_16 = (uae_u16*)src_32; + uae_u16 *dst_16 = (uae_u16*)dst_32; + BLT_FUNC (src_16, dst_16); + } #elif BLT_SIZE == 1 - { - int wb = w & 3; - uae_u8 *src_8 = (uae_u8*)src_32; - uae_u8 *dst_8 = (uae_u8*)dst_32; - while (wb--) { - BLT_FUNC (src_8, dst_8); - src_8++; - dst_8++; + { + int wb = w & 3; + uae_u8 *src_8 = (uae_u8*)src_32; + uae_u8 *dst_8 = (uae_u8*)dst_32; + while (wb--) { + BLT_FUNC (src_8, dst_8); + src_8++; + dst_8++; + } } - } #endif - dst2 += dstpitch; - src2 += srcpitch; - } + dst2 += dstpitch; + src2 += srcpitch; + } } #endif #undef BLT_NAME -- 2.47.3