mirror of
https://github.com/86Box/86Box.git
synced 2026-02-25 04:45:31 -07:00
Merge branch 'master'
This commit is contained in:
@@ -108,6 +108,10 @@ endif()
|
||||
target_link_libraries(86Box cpu chipset mch dev mem fdd game cdrom zip mo hdd
|
||||
net print scsi sio snd vid voodoo plat ui)
|
||||
|
||||
if(HAIKU)
|
||||
target_link_libraries(86Box be)
|
||||
endif()
|
||||
|
||||
if(WIN32 AND ARCH STREQUAL "i386")
|
||||
if(MINGW)
|
||||
target_link_options(86Box PRIVATE "LINKER:--large-address-aware")
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
listings on forums, as VIA's datasheets are not very helpful regarding those. */
|
||||
#define VIA_PIPC_586A 0x05862500
|
||||
#define VIA_PIPC_586B 0x05864700
|
||||
#define VIA_PIPC_586 0x0586
|
||||
#define VIA_PIPC_596A 0x05960900
|
||||
#define VIA_PIPC_596B 0x05962300
|
||||
#define VIA_PIPC_596 0x0596
|
||||
@@ -414,7 +415,7 @@ pipc_reset_hard(void *priv)
|
||||
dev->power_regs[0x34] = 0x68;
|
||||
dev->power_regs[0x40] = 0x20;
|
||||
|
||||
dev->power_regs[0x42] = ((dev->local >> 16) == VIA_PIPC_596) ? 0x50 : 0x00;
|
||||
dev->power_regs[0x42] = ((dev->local >> 16) == VIA_PIPC_586) ? 0x00 : 0x50;
|
||||
acpi_set_irq_line(dev->acpi, 0x00);
|
||||
|
||||
dev->power_regs[0x48] = 0x01;
|
||||
@@ -1596,7 +1597,7 @@ pipc_reset(void *priv)
|
||||
pipc_write(pm_func, 0x48, 0x01, priv);
|
||||
pipc_write(pm_func, 0x49, 0x00, priv);
|
||||
|
||||
dev->power_regs[0x42] = ((dev->local >> 16) == VIA_PIPC_596) ? 0x50 : 0x00;
|
||||
dev->power_regs[0x42] = ((dev->local >> 16) == VIA_PIPC_586) ? 0x00 : 0x50;
|
||||
acpi_set_irq_line(dev->acpi, 0x00);
|
||||
|
||||
pipc_write(1, 0x04, 0x80, priv);
|
||||
|
||||
@@ -3948,12 +3948,15 @@ pentium_invalid_wrmsr:
|
||||
/* Test Data */
|
||||
case 0x03:
|
||||
msr.tr3 = EAX;
|
||||
break;
|
||||
/* Test Address */
|
||||
case 0x04:
|
||||
msr.tr4 = EAX;
|
||||
break;
|
||||
/* Test Command/Status */
|
||||
case 0x05:
|
||||
msr.tr5 = EAX & 0x008f0f3b;
|
||||
break;
|
||||
/* Time Stamp Counter */
|
||||
case 0x10:
|
||||
timer_set_new_tsc(EAX | ((uint64_t) EDX << 32));
|
||||
|
||||
@@ -18,6 +18,11 @@
|
||||
* Copyright 2021-2022 Cacodemon345
|
||||
* Copyright 2021-2022 Teemu Korhonen
|
||||
*/
|
||||
|
||||
#ifdef __HAIKU__
|
||||
#include <OS.h>
|
||||
#endif
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include <mutex>
|
||||
@@ -828,6 +833,8 @@ plat_set_thread_name(void *thread, const char *name)
|
||||
pthread_setname_np(truncated);
|
||||
# elif defined(Q_OS_NETBSD)
|
||||
pthread_setname_np(thread ? *((pthread_t *) thread) : pthread_self(), truncated, "%s");
|
||||
# elif defined(__HAIKU__)
|
||||
rename_thread(find_thread(NULL), truncated);
|
||||
# elif defined(Q_OS_OPENBSD)
|
||||
pthread_set_name_np(thread ? *((pthread_t *) thread) : pthread_self(), truncated);
|
||||
# else
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# define _FILE_OFFSET_BITS 64
|
||||
# define _LARGEFILE64_SOURCE 1
|
||||
#endif
|
||||
#ifdef __HAIKU__
|
||||
#include <OS.h>
|
||||
#endif
|
||||
#include <SDL.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
@@ -1398,16 +1401,20 @@ plat_set_thread_name(void *thread, const char *name)
|
||||
if (thread) /* Apple pthread can only set self's name */
|
||||
return;
|
||||
char truncated[64];
|
||||
#elif defined(Q_OS_NETBSD)
|
||||
#elif defined(__NetBSD__)
|
||||
char truncated[64];
|
||||
#elif defined(__HAIKU__)
|
||||
char truncated[32];
|
||||
#else
|
||||
char truncated[16];
|
||||
#endif
|
||||
strncpy(truncated, name, sizeof(truncated) - 1);
|
||||
#ifdef __APPLE__
|
||||
pthread_setname_np(truncated);
|
||||
#elif defined(Q_OS_NETBSD)
|
||||
#elif defined(__NetBSD__)
|
||||
pthread_setname_np(thread ? *((pthread_t *) thread) : pthread_self(), truncated, "%s");
|
||||
#elif defined(__HAIKU__)
|
||||
rename_thread(find_thread(NULL), truncated);
|
||||
#else
|
||||
pthread_setname_np(thread ? *((pthread_t *) thread) : pthread_self(), truncated);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user