trying to sync rc1

parent dd63b94a
......@@ -4405,7 +4405,7 @@ void config_check_vsync (void)
cnt--;
if (config_changed) {
// if (config_changed == 1)
// write_log (L"* configuration check trigger\n");
// write_log ("* configuration check trigger\n");
config_changed++;
if (config_changed > 10)
config_changed = 0;
......
......@@ -1969,7 +1969,7 @@ static void pfield_draw_line (int lineno, int gfx_ypos, int follow_ypos)
{
case LINE_REMEMBERED_AS_PREVIOUS:
// if (!warned) // happens when program messes up with VPOSW
// write_log (L"Shouldn't get here... this is a bug.\n"), warned++;
// write_log ("Shouldn't get here... this is a bug.\n"), warned++;
return;
case LINE_BLACK:
......
......@@ -534,9 +534,7 @@ void setup_greydither_maxcol (int maxcol, allocfunc_type allocfunc)
int rgb = (r << 8) | (g << 4) | b;
int c,p,q;
c = (77 * r +
151 * g +
28 * b) / 15; /* c in 0..256 */
c = (77 * r + 151 * g + 28 * b) / 15; /* c in 0..256 */
k = maxcol-1;
p = (c * k) / 256;
......@@ -544,8 +542,7 @@ void setup_greydither_maxcol (int maxcol, allocfunc_type allocfunc)
if (q /*/ k*/> d /*/ k*/ && p < k) ++p;
/* sam: ^^^^^^^ */
/* It seems that produces better output */
cidx[i][rgb + (j+4)*4096] =
cidx[i][rgb + j*4096] = (uae_u8)map[p];
cidx[i][rgb + (j+4)*4096] = cidx[i][rgb + j*4096] = (uae_u8)map[p];
}
}
}
......@@ -633,39 +630,7 @@ void setup_dither (int bits, allocfunc_type allocfunc)
for (i = 0; i < 4; ++i) for (j = 0; j < 4; ++j) {
int d = dither[i][j];
int cr, cg, cb, k, q;
#if 0 /* Slightly different algorithm. Needs some tuning. */
int rederr = 0, grnerr = 0, bluerr = 0;
k = nb_cols[RED]-1;
cr = r * k / 15;
q = r * k - 15*cr;
if (cr < 0)
cr = 0;
else if (q / k > d / k && rederr <= 0)
++cr;
if (cr > k) cr = k;
rederr += redvals[cr]-r;
k = nb_cols[GRN]-1;
cg = g * k / 15;
q = g * k - 15*cg;
if (cg < 0)
cg = 0;
else if (q / k > d / k && grnerr <= 0)
++cg;
if (cg > k) cg = k;
grnerr += grnvals[cg]-g;
k = nb_cols[BLU]-1;
cb = b * k / 15;
q = b * k - 15*cb;
if (cb < 0)
cb = 0;
else if (q / k > d / k && bluerr <= 0)
++cb;
if (cb > k) cb = k;
bluerr += bluvals[cb]-b;
#else
k = nb_cols[RED]-1;
cr = r * k / 15;
q = r * k - 15*cr;
......@@ -692,7 +657,7 @@ void setup_dither (int bits, allocfunc_type allocfunc)
else if (q /*/ k*/ > d /*/ k*/)
++cb;
if (cb > k) cb = k;
#endif
cidx[i][rgb + (j+4)*4096] = cidx[i][rgb + j*4096] = (uae_u8)map[(cr*nb_cols[GRN]+cg)*nb_cols[BLU]+cb];
}
}
......
/*
/*
* UAE - The Un*x Amiga Emulator
*
* joystick/mouse emulation
......@@ -457,7 +457,9 @@ static void write_kbr_config (struct zfile *f, int idnum, int devnum, struct uae
kbr->port[i][SPARE_SUB_EVENT] &&
keyboard_default[k].evt == kbr->eventid[i][SPARE_SUB_EVENT] && keyboard_default[k].flags == (kbr->flags[i][SPARE_SUB_EVENT] & ID_FLAG_SAVE_MASK);
if (kbr->port[i][0] > 0 && !(kbr->flags[i][0] & ID_FLAG_GAMEPORTSCUSTOM) && (kbr->port[i][SPARE_SUB_EVENT] == 0 || isdefaultspare))
if (kbr->port[i][0] > 0 && !(kbr->flags[i][0] & ID_FLAG_GAMEPORTSCUSTOM) &&
(kbr->eventid[i][1] <= 0 && kbr->eventid[i][2] <= 0 && kbr->eventid[i][3] <= 0) &&
(kbr->port[i][SPARE_SUB_EVENT] == 0 || isdefaultspare))
skip = 1;
if (kbr->eventid[i][0] == 0 && (kbr->flags[i][0] & ID_FLAG_SAVE_MASK) == 0 && keyboard_default[k].scancode < 0)
skip = 1;
......@@ -483,7 +485,7 @@ static void write_kbr_config (struct zfile *f, int idnum, int devnum, struct uae
*p = 0;
}
bool ok = write_slot (p, kbr, i, slotorder[j]);
p += _tcslen(p);
p += _tcslen (p);
if (ok) {
// save port number + SPARE SLOT if needed
if (kbr->port[i][slotorder[j]] > 0 && (kbr->flags[i][slotorder[j]] & ID_FLAG_GAMEPORTSCUSTOM)) {
......@@ -498,8 +500,7 @@ static void write_kbr_config (struct zfile *f, int idnum, int devnum, struct uae
}
}
idf->get_widget_type (devnum, i, tmp5, NULL);
p = tmp5 + _tcslen (tmp5) + 1;
_stprintf (tmp3, "%d%s%s", kbr->extra[i], p[0] ? "." : "", p[0] ? p : "");
_stprintf (tmp3, "%d%s%s", kbr->extra[i], tmp5[0] ? "." : "", tmp5[0] ? tmp5 : "");
kbrlabel (tmp3);
_stprintf (tmp1, "keyboard.%d.button.%s", devnum, tmp3);
_stprintf (tmp4, "input.%d.%s", idnum + 1, tmp1);
......@@ -2145,7 +2146,7 @@ uae_u16 POTGOR (void)
v = dongle_potgor (v);
#ifdef DONGLE_DEBUG
if (notinrom ())
write_log ("POTGOR %04.4X %s\n", v, debuginfo(0));
write_log ("POTGOR %04X %s\n", v, debuginfo(0));
#endif
if (inputdevice_logging & 16)
write_log ("POTGO_R: %04X %08X %d\n", v, M68K_GETPC, cd32_shifter[1]);
......@@ -2336,7 +2337,7 @@ void inputdevice_handle_inputcode (void)
break;
#ifdef SAVESTATE
case AKS_STATEREWIND:
savestate_dorewind(1);
savestate_dorewind (1);
#endif
break;
case AKS_VOLDOWN:
......@@ -3626,7 +3627,7 @@ static void cleardevkbrgp (struct uae_input_device *uid, int num, bool nocustom,
}
}
}
}
}
}
// remove all gameports mappings mapped to port 'index'
......@@ -4444,7 +4445,7 @@ static int inputdevice_translatekeycode_2 (int keyboard, int scancode, int state
#define STEALTHF_SPECIAL 0x02
#define STEALTHF_E1KEY 0x01
static void sendmmcodes(int code, int newstate)
static void sendmmcodes (int code, int newstate)
{
uae_u8 b;
......@@ -5229,7 +5230,7 @@ void setjoystickstate (int joy, int axis, int state, int max)
handle_input_event (id->eventid[ID_AXIS_OFFSET + axis][i], state, max, id->flags[ID_AXIS_OFFSET + axis][i]);
id2->states[axis] = state;
}
int getjoystickstate(int joy)
int getjoystickstate (int joy)
{
if (testmode)
return 1;
......@@ -5394,7 +5395,7 @@ int inputdevice_joyport_config (struct uae_prefs *p, TCHAR *value, int portnum,
struct inputdevice_functions *idf;
int type = IDTYPE_MOUSE;
int idnum = JSEM_MICE;
if (j == 0) {
if (j > 0) {
type = IDTYPE_JOYSTICK;
idnum = JSEM_JOYS;
}
......@@ -5415,20 +5416,23 @@ int inputdevice_joyport_config (struct uae_prefs *p, TCHAR *value, int portnum,
break;
case 0:
{
int start = JPORT_NONE, got = 0;
int start = JPORT_NONE, got = 0, max = 0;
TCHAR *pp = 0;
if (_tcsncmp (value, "kbd", 3) == 0) {
start = JSEM_KBDLAYOUT;
pp = value + 3;
got = 1;
max = JSEM_LASTKBD;
} else if (_tcsncmp (value, "joy", 3) == 0) {
start = JSEM_JOYS;
pp = value + 3;
got = 1;
max = idev[IDTYPE_JOYSTICK].get_num ();
} else if (_tcsncmp (value, "mouse", 5) == 0) {
start = JSEM_MICE;
pp = value + 5;
got = 1;
max = idev[IDTYPE_MOUSE].get_num ();
} else if (_tcscmp (value, "none") == 0) {
got = 2;
} else if (_tcscmp (value, "custom") == 0) {
......@@ -5442,6 +5446,8 @@ int inputdevice_joyport_config (struct uae_prefs *p, TCHAR *value, int portnum,
if (start == JSEM_KBDLAYOUT && v > 0)
v--;
if (v >= 0) {
if (v >= max)
v = 0;
start += v;
got = 2;
}
......
......@@ -445,7 +445,7 @@ configure:4344: $? = 0
configure:4344: result: yes
configure:4350: checking for _doprnt
configure:4350: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/ccKkOe2m.o: In function `main':
/tmp/ccbgMYIz.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:67: undefined reference to `_doprnt'
collect2: ld returned 1 exit status
configure:4350: $? = 1
......@@ -533,7 +533,7 @@ configure:4364: $? = 0
configure:4364: result: yes
configure:4364: checking for strcmpi
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/ccZO2eLu.o: In function `main':
/tmp/ccc0XecR.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `strcmpi'
collect2: ld returned 1 exit status
configure:4364: $? = 1
......@@ -613,7 +613,7 @@ configure: failed program was:
configure:4364: result: no
configure:4364: checking for stricmp
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/ccmHyUSz.o: In function `main':
/tmp/ccfbSEaY.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `stricmp'
collect2: ld returned 1 exit status
configure:4364: $? = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment