mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-12-26 00:31:44 +00:00
Fixes for Linux build
This commit is contained in:
parent
fd2f143c64
commit
670a776571
@ -27,7 +27,7 @@
|
|||||||
/* Symbol naming issues */
|
/* Symbol naming issues */
|
||||||
#ifdef NO_UNDERSCORES
|
#ifdef NO_UNDERSCORES
|
||||||
#define SN(foo) foo
|
#define SN(foo) foo
|
||||||
#define SNX(foo, INDEX, SCALE) _##foo(%rip,INDEX,SCALE)
|
#define SNX(foo, INDEX, SCALE) foo(,INDEX,SCALE)
|
||||||
#define E(foo) .globl foo; .balign 16; foo##:
|
#define E(foo) .globl foo; .balign 16; foo##:
|
||||||
#define CALL(foo) foo
|
#define CALL(foo) foo
|
||||||
#else /* !NO_UNDERSCORES */
|
#else /* !NO_UNDERSCORES */
|
||||||
|
@ -143,9 +143,10 @@ void c_eject_6(int drive) {
|
|||||||
{
|
{
|
||||||
ERRLOG("OOPS: An error occurred when attempting to compress a disk image : %s", err);
|
ERRLOG("OOPS: An error occurred when attempting to compress a disk image : %s", err);
|
||||||
#ifdef INTERFACE_CLASSIC
|
#ifdef INTERFACE_CLASSIC
|
||||||
|
int ch = -1;
|
||||||
snprintf(&zlibmenu[4][2], 37, "%s", err);
|
snprintf(&zlibmenu[4][2], 37, "%s", err);
|
||||||
c_interface_print_submenu_centered(zlibmenu[0], ZLIB_SUBMENU_W, ZLIB_SUBMENU_H);
|
c_interface_print_submenu_centered(zlibmenu[0], ZLIB_SUBMENU_W, ZLIB_SUBMENU_H);
|
||||||
while ((int ch = c_mygetch(1)) == -1) {
|
while ((ch = c_mygetch(1)) == -1) {
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -190,9 +191,10 @@ int c_new_diskette_6(int drive, const char * const raw_file_name, int force) {
|
|||||||
{
|
{
|
||||||
ERRLOG("OOPS: An error occurred when attempting to inflate/load a disk image : %s", err);
|
ERRLOG("OOPS: An error occurred when attempting to inflate/load a disk image : %s", err);
|
||||||
#ifdef INTERFACE_CLASSIC
|
#ifdef INTERFACE_CLASSIC
|
||||||
|
int ch = -1;
|
||||||
snprintf(&zlibmenu[4][2], 37, "%s", err);
|
snprintf(&zlibmenu[4][2], 37, "%s", err);
|
||||||
c_interface_print_submenu_centered(zlibmenu[0], ZLIB_SUBMENU_W, ZLIB_SUBMENU_H);
|
c_interface_print_submenu_centered(zlibmenu[0], ZLIB_SUBMENU_W, ZLIB_SUBMENU_H);
|
||||||
while ((int ch = c_mygetch(1)) == -1) {
|
while ((ch = c_mygetch(1)) == -1) {
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -372,6 +372,7 @@ bool save_settings(void)
|
|||||||
#define ERROR_SUBMENU_H 9
|
#define ERROR_SUBMENU_H 9
|
||||||
#define ERROR_SUBMENU_W 40
|
#define ERROR_SUBMENU_W 40
|
||||||
#ifdef INTERFACE_CLASSIC
|
#ifdef INTERFACE_CLASSIC
|
||||||
|
int ch = -1;
|
||||||
char submenu[ERROR_SUBMENU_H][ERROR_SUBMENU_W+1] =
|
char submenu[ERROR_SUBMENU_H][ERROR_SUBMENU_W+1] =
|
||||||
//1. 5. 10. 15. 20. 25. 30. 35. 40.
|
//1. 5. 10. 15. 20. 25. 30. 35. 40.
|
||||||
{ "||||||||||||||||||||||||||||||||||||||||",
|
{ "||||||||||||||||||||||||||||||||||||||||",
|
||||||
@ -391,7 +392,7 @@ bool save_settings(void)
|
|||||||
PREFS_ERRPRINT();
|
PREFS_ERRPRINT();
|
||||||
#ifdef INTERFACE_CLASSIC
|
#ifdef INTERFACE_CLASSIC
|
||||||
c_interface_print_submenu_centered(submenu[0], ERROR_SUBMENU_W, ERROR_SUBMENU_H);
|
c_interface_print_submenu_centered(submenu[0], ERROR_SUBMENU_W, ERROR_SUBMENU_H);
|
||||||
while ((int ch = c_mygetch(1)) == -1)
|
while ((ch = c_mygetch(1)) == -1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
9
src/vm.c
9
src/vm.c
@ -142,7 +142,16 @@ GLUE_C_READ(read_keyboard_strobe)
|
|||||||
|
|
||||||
GLUE_C_READ(read_random)
|
GLUE_C_READ(read_random)
|
||||||
{
|
{
|
||||||
|
#ifdef __APPLE__
|
||||||
return arc4random_uniform(0x100);
|
return arc4random_uniform(0x100);
|
||||||
|
#else
|
||||||
|
static time_t seed=0;
|
||||||
|
if (!seed) {
|
||||||
|
seed = time(NULL);
|
||||||
|
srandom(seed);
|
||||||
|
}
|
||||||
|
return (random() % UINT_MAX);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
GLUE_C_READ(speaker_toggle)
|
GLUE_C_READ(speaker_toggle)
|
||||||
|
Loading…
Reference in New Issue
Block a user