sync 2.2.0

parent a7f65548
......@@ -3778,7 +3778,7 @@ static void setautofires (struct uae_prefs *prefs, int port, int af)
static void compatibility_copy (struct uae_prefs *prefs, bool gameports)
{
int used[MAX_INPUT_DEVICES] = { 0 };
int i, joy, j;
int i, joy;
for (i = 0; i < MAX_JPORTS; i++) {
joymodes[i] = prefs->jports[i].mode;
......@@ -4326,7 +4326,7 @@ void inputdevice_devicechange (struct uae_prefs *prefs)
// set default prefs to all input configuration settings
void inputdevice_default_prefs (struct uae_prefs *p)
{
int i, j;
int i;
inputdevice_init ();
p->input_selected_setting = GAMEPORT_INPUT_SETTINGS;
......
/*
* UAE - The Un*x Amiga Emulator
*
* Keyboard buffer. Not really needed for X, but for SVGAlib and possibly
* Mac and DOS ports.
*
* Note: it's possible to have two threads in UAE, one reading keystrokes
* and the other one writing them. Despite this, no synchronization effort
* is needed. This code should be perfectly thread safe. At least if you
* assume that integer store instructions are atomic.
*
* Copyright 1995, 1997 Bernd Schmidt
*/
/*
* UAE - The Un*x Amiga Emulator
*
* Keyboard buffer. Not really needed for X, but for SVGAlib and possibly
* Mac and DOS ports.
*
* Note: it's possible to have two threads in UAE, one reading keystrokes
* and the other one writing them. Despite this, no synchronization effort
* is needed. This code should be perfectly thread safe. At least if you
* assume that integer store instructions are atomic.
*
* Copyright 1995, 1997 Bernd Schmidt
*/
#include "sysconfig.h"
#include "sysdeps.h"
......@@ -29,20 +29,20 @@ static int keybuf[256];
int keys_available (void)
{
int val;
val = kpb_first != kpb_last;
return val;
int val;
val = kpb_first != kpb_last;
return val;
}
int get_next_key (void)
{
int key;
assert (kpb_first != kpb_last);
int key;
assert (kpb_first != kpb_last);
key = keybuf[kpb_last];
if (++kpb_last == 256)
key = keybuf[kpb_last];
if (++kpb_last == 256)
kpb_last = 0;
return key;
return key;
}
int record_key (int kc)
......@@ -58,23 +58,23 @@ int record_key (int kc)
int record_key_direct (int kc)
{
int fs = 0;
int kpb_next = kpb_first + 1;
int k = kc >> 1;
int b = !(kc & 1);
int fs = 0;
int kpb_next = kpb_first + 1;
int k = kc >> 1;
int b = !(kc & 1);
//write_log ("got kc %02X\n", ((kc << 7) | (kc >> 1)) & 0xff);
if (kpb_next == 256)
kpb_next = 0;
if (kpb_next == kpb_last) {
if (kpb_next == 256)
kpb_next = 0;
if (kpb_next == kpb_last) {
write_log ("Keyboard buffer overrun. Congratulations.\n");
return 0;
}
}
if ((kc >> 1) == AK_RCTRL) {
kc ^= AK_RCTRL << 1;
kc ^= AK_CTRL << 1;
}
if ((kc >> 1) == AK_RCTRL) {
kc ^= AK_RCTRL << 1;
kc ^= AK_CTRL << 1;
}
#ifdef INPREC
if (input_recording > 0) {
......@@ -84,34 +84,34 @@ int record_key_direct (int kc)
}
#endif
keybuf[kpb_first] = kc;
kpb_first = kpb_next;
keybuf[kpb_first] = kc;
kpb_first = kpb_next;
return 1;
}
void keybuf_init (void)
{
kpb_first = kpb_last = 0;
inputdevice_updateconfig (&currprefs);
kpb_first = kpb_last = 0;
inputdevice_updateconfig (&currprefs);
}
#ifdef SAVESTATE
uae_u8 *save_keyboard (int *len)
{
uae_u8 *dst, *t;
uae_u8 *dst, *t;
dst = t = xmalloc (uae_u8, 8);
save_u32 (getcapslockstate() ? 1 : 0);
save_u32 (0);
*len = 8;
return t;
save_u32 (getcapslockstate () ? 1 : 0);
save_u32 (0);
*len = 8;
return t;
}
uae_u8 *restore_keyboard (uae_u8 *src)
{
setcapslockstate (restore_u32 ());
restore_u32 ();
return src;
setcapslockstate (restore_u32 ());
restore_u32 ();
return src;
}
#endif /* SAVESTATE */
......@@ -411,7 +411,7 @@ void fixup_prefs (struct uae_prefs *p)
p->cpu_compatible = 1;
p->address_space_24 = 1;
#endif
#if !defined(CPUEMU_11) && !defined (CPUEMU_12)
#if !defined (CPUEMU_11) && !defined (CPUEMU_12)
p->cpu_compatible = 0;
p->address_space_24 = 0;
#endif
......@@ -926,7 +926,7 @@ static int real_main2 (int argc, TCHAR **argv)
DISK_init ();
reset_frame_rate_hack ();
init_m68k(); /* must come after reset_frame_rate_hack (); */
init_m68k (); /* must come after reset_frame_rate_hack (); */
gui_update ();
......@@ -938,7 +938,7 @@ static int real_main2 (int argc, TCHAR **argv)
#endif
if (!init_audio ()) {
if (sound_available && currprefs.produce_sound > 1) {
if (sound_available && currprefs.produce_sound > 1) {
write_log ("Sound driver unavailable: Sound output disabled\n");
}
currprefs.produce_sound = 0;
......
......@@ -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/cczRCLXC.o: In function `main':
/tmp/ccRLmAmi.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/ccZxlONG.o: In function `main':
/tmp/ccWAe3Gy.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/ccRpVkEO.o: In function `main':
/tmp/ccd6el6G.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