Added Matrox Mystique emulation. This is a work in progress, and has a few known
issues : - Only YUV supported for scaled ILOAD operations - Several BLTMOD formats missing - Bad texturing in Actua Soccer - Flickering in Croc (broken vsync waiting?) - Turok doesn't swap buffers correctly - Some missing features
This commit is contained in:
parent
22977a4ff7
commit
483c7db709
11 changed files with 5199 additions and 8 deletions
|
|
@ -69,6 +69,43 @@ void thread_destroy_event(event_t *_event)
|
|||
free(event);
|
||||
}
|
||||
|
||||
typedef struct win_mutex_t
|
||||
{
|
||||
HANDLE handle;
|
||||
} win_mutex_t;
|
||||
|
||||
mutex_t *thread_create_mutex(void)
|
||||
{
|
||||
win_mutex_t *mutex = malloc(sizeof(win_mutex_t));
|
||||
|
||||
mutex->handle = CreateSemaphore(NULL, 1, 1, NULL);
|
||||
|
||||
return mutex;
|
||||
|
||||
}
|
||||
|
||||
void thread_lock_mutex(mutex_t *_mutex)
|
||||
{
|
||||
win_mutex_t *mutex = (win_mutex_t *)_mutex;
|
||||
|
||||
WaitForSingleObject(mutex->handle, INFINITE);
|
||||
}
|
||||
|
||||
void thread_unlock_mutex(mutex_t *_mutex)
|
||||
{
|
||||
win_mutex_t *mutex = (win_mutex_t *)_mutex;
|
||||
|
||||
ReleaseSemaphore(mutex->handle, 1, NULL);
|
||||
}
|
||||
|
||||
void thread_destroy_mutex(mutex_t *_mutex)
|
||||
{
|
||||
win_mutex_t *mutex = (win_mutex_t *)_mutex;
|
||||
|
||||
CloseHandle(mutex->handle);
|
||||
|
||||
free(mutex);
|
||||
}
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
|||
Loading…
Reference in a new issue