diff --git a/src/include/86box/network.h b/src/include/86box/network.h index 967c581b1..2fe0553f8 100644 --- a/src/include/86box/network.h +++ b/src/include/86box/network.h @@ -127,6 +127,7 @@ struct _netcard_t { mutex_t *tx_mutex; mutex_t *rx_mutex; pc_timer_t timer; + int card_num; }; typedef struct { diff --git a/src/include/86box/vid_voodoo_codegen_x86-64.h b/src/include/86box/vid_voodoo_codegen_x86-64.h index bd992e1d0..4999f38c5 100644 --- a/src/include/86box/vid_voodoo_codegen_x86-64.h +++ b/src/include/86box/vid_voodoo_codegen_x86-64.h @@ -46,32 +46,24 @@ static int next_block_to_write[4] = { 0, 0 }; #define addbyte(val) \ do { \ code_block[block_pos++] = val; \ - if (block_pos >= BLOCK_SIZE) \ - fatal("Over!\n"); \ } while (0) #define addword(val) \ do { \ *(uint16_t *) &code_block[block_pos] = val; \ block_pos += 2; \ - if (block_pos >= BLOCK_SIZE) \ - fatal("Over!\n"); \ } while (0) #define addlong(val) \ do { \ *(uint32_t *) &code_block[block_pos] = val; \ block_pos += 4; \ - if (block_pos >= BLOCK_SIZE) \ - fatal("Over!\n"); \ } while (0) #define addquad(val) \ do { \ *(uint64_t *) &code_block[block_pos] = val; \ block_pos += 8; \ - if (block_pos >= BLOCK_SIZE) \ - fatal("Over!\n"); \ } while (0) static __m128i xmm_01_w; // = 0x0001000100010001ull; diff --git a/src/include/86box/vid_voodoo_codegen_x86.h b/src/include/86box/vid_voodoo_codegen_x86.h index f9685344f..9432fa3b3 100644 --- a/src/include/86box/vid_voodoo_codegen_x86.h +++ b/src/include/86box/vid_voodoo_codegen_x86.h @@ -44,32 +44,24 @@ static int next_block_to_write[4] = { 0, 0 }; #define addbyte(val) \ do { \ code_block[block_pos++] = val; \ - if (block_pos >= BLOCK_SIZE) \ - fatal("Over!\n"); \ } while (0) #define addword(val) \ do { \ *(uint16_t *) &code_block[block_pos] = val; \ block_pos += 2; \ - if (block_pos >= BLOCK_SIZE) \ - fatal("Over!\n"); \ } while (0) #define addlong(val) \ do { \ *(uint32_t *) &code_block[block_pos] = val; \ block_pos += 4; \ - if (block_pos >= BLOCK_SIZE) \ - fatal("Over!\n"); \ } while (0) #define addquad(val) \ do { \ *(uint64_t *) &code_block[block_pos] = val; \ block_pos += 8; \ - if (block_pos >= BLOCK_SIZE) \ - fatal("Over!\n"); \ } while (0) static __m128i xmm_01_w; // = 0x0001000100010001ull; diff --git a/src/network/net_slirp.c b/src/network/net_slirp.c index a74d06173..7535a0609 100644 --- a/src/network/net_slirp.c +++ b/src/network/net_slirp.c @@ -415,7 +415,7 @@ net_slirp_init(const netcard_t *card, const uint8_t *mac_addr, void *priv) struct in_addr host = { .s_addr = htonl(0x0a000002 | (slirp_card_num << 8)) }; /* 10.0.x.2 */ struct in_addr dhcp = { .s_addr = htonl(0x0a00000f | (slirp_card_num << 8)) }; /* 10.0.x.15 */ struct in_addr dns = { .s_addr = htonl(0x0a000003 | (slirp_card_num << 8)) }; /* 10.0.x.3 */ - struct in_addr bind = { .s_addr = htonl(0x00000000 | (slirp_card_num << 8)) }; /* 0.0.0.0 */ + struct in_addr bind = { .s_addr = htonl(0x00000000) }; /* 0.0.0.0 */ struct in6_addr ipv6_dummy = { 0 }; /* contents don't matter; we're not using IPv6 */ /* Initialize SLiRP. */ @@ -428,7 +428,8 @@ net_slirp_init(const netcard_t *card, const uint8_t *mac_addr, void *priv) /* Set up port forwarding. */ int udp, external, internal, i = 0; - char *category = "SLiRP Port Forwarding"; + char category[32]; + snprintf(category, sizeof(category), "SLiRP Port Forwarding #%i", card->card_num + 1); char key[20]; while (1) { sprintf(key, "%d_protocol", i); diff --git a/src/network/network.c b/src/network/network.c index 58ff2516d..a406140c4 100644 --- a/src/network/network.c +++ b/src/network/network.c @@ -388,6 +388,7 @@ network_attach(void *card_drv, uint8_t *mac, NETRXCB rx, NETWAITCB wait, NETSETL card->set_link_state = set_link_state; card->tx_mutex = thread_create_mutex(); card->rx_mutex = thread_create_mutex(); + card->card_num = net_card_current; for (int i=0; i<3; i++) { network_queue_init(&card->queues[i]); diff --git a/src/printer/prt_escp.c b/src/printer/prt_escp.c index ec07dc95f..013726c06 100644 --- a/src/printer/prt_escp.c +++ b/src/printer/prt_escp.c @@ -90,7 +90,7 @@ #ifdef _WIN32 # define PATH_FREETYPE_DLL "freetype.dll" #elif defined __APPLE__ -# define PATH_FREETYPE_DLL "libfreetype.dylib" +# define PATH_FREETYPE_DLL "libfreetype.6.dylib" #else # define PATH_FREETYPE_DLL "libfreetype.so.6" #endif diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index 0cb4560c4..1db01301d 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -309,7 +309,11 @@ if (APPLE AND CMAKE_MACOSX_BUNDLE) install(CODE " include(BundleUtilities) get_filename_component(CMAKE_INSTALL_PREFIX_ABSOLUTE \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX} ABSOLUTE) - fixup_bundle(\"\${CMAKE_INSTALL_PREFIX_ABSOLUTE}/86Box.app\" \"${QT_PLUGINS}\" \"${DIRS}\")") + fixup_bundle(\"\${CMAKE_INSTALL_PREFIX_ABSOLUTE}/86Box.app\" \"${QT_PLUGINS}\" \"${DIRS}\") + execute_process( + COMMAND ${CMAKE_INSTALL_NAME_TOOL} -add_rpath \"@executable_path/../Frameworks/\" + \"\${CMAKE_INSTALL_PREFIX_ABSOLUTE}/${INSTALL_RUNTIME_DIR}/86Box\") + ") endif() if (UNIX AND NOT APPLE AND NOT HAIKU)