sync 2.2.0

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