void *open_tablet (HWND hwnd)
{
#ifndef _WIN64
+ static int initialized;
LOGCONTEXT lc;
AXIS tx = { 0 }, ty = { 0 }, tz = { 0 };
AXIS pres = { 0 };
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;
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;
}
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);
|| 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))
#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