mirror of
https://github.com/holub/mame
synced 2025-10-06 17:08:28 +03:00
Pick off some low-hanging PTR64 fruit
This commit is contained in:
parent
aec01e7407
commit
92b84c8463
@ -11,6 +11,7 @@
|
|||||||
#include "sdlinc.h"
|
#include "sdlinc.h"
|
||||||
|
|
||||||
// standard C headers
|
// standard C headers
|
||||||
|
#include <cstdint>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@ -175,11 +176,7 @@ static int worker_thread_entry(void *param)
|
|||||||
void *res;
|
void *res;
|
||||||
|
|
||||||
res = thread->callback(thread->param);
|
res = thread->callback(thread->param);
|
||||||
#ifdef PTR64
|
return int(intptr_t(res));
|
||||||
return (int) (INT64) res;
|
|
||||||
#else
|
|
||||||
return (int) res;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
osd_thread *osd_thread_create(osd_thread_callback callback, void *cbparam)
|
osd_thread *osd_thread_create(osd_thread_callback callback, void *cbparam)
|
||||||
|
@ -17,6 +17,9 @@
|
|||||||
#include "eminline.h"
|
#include "eminline.h"
|
||||||
#include "osdsync.h"
|
#include "osdsync.h"
|
||||||
|
|
||||||
|
// C++ headers
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
|
||||||
//============================================================
|
//============================================================
|
||||||
// DEBUGGING
|
// DEBUGGING
|
||||||
@ -144,11 +147,7 @@ static unsigned __stdcall worker_thread_entry(void *param)
|
|||||||
osd_thread *thread = (osd_thread *) param;
|
osd_thread *thread = (osd_thread *) param;
|
||||||
void *res;
|
void *res;
|
||||||
res = thread->callback(thread->param);
|
res = thread->callback(thread->param);
|
||||||
#ifdef PTR64
|
return unsigned(uintptr_t(res));
|
||||||
return (unsigned) (long long) res;
|
|
||||||
#else
|
|
||||||
return (unsigned) res;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
osd_thread *osd_thread_create(osd_thread_callback callback, void *cbparam)
|
osd_thread *osd_thread_create(osd_thread_callback callback, void *cbparam)
|
||||||
|
@ -88,11 +88,7 @@ using INT64 = signed long long;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* pointer-sized values */
|
/* pointer-sized values */
|
||||||
#ifdef PTR64
|
using FPTR = uintptr_t;
|
||||||
using FPTR = UINT64;
|
|
||||||
#else
|
|
||||||
using FPTR = UINT32;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,18 +17,15 @@
|
|||||||
|
|
||||||
#include "modules/osdwindow.h"
|
#include "modules/osdwindow.h"
|
||||||
|
|
||||||
// I don't like this, but we're going to get spurious "cast to integer of different size" warnings on
|
#include <cstdint>
|
||||||
// at least one architecture without doing it this way.
|
|
||||||
#ifdef PTR64
|
|
||||||
typedef UINT64 HashT;
|
|
||||||
#else
|
|
||||||
typedef UINT32 HashT;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//============================================================
|
//============================================================
|
||||||
// TYPE DEFINITIONS
|
// TYPE DEFINITIONS
|
||||||
//============================================================
|
//============================================================
|
||||||
|
|
||||||
|
typedef uintptr_t HashT;
|
||||||
|
|
||||||
#define OSDWORK_CALLBACK(name) void *name(void *param, ATTR_UNUSED int threadid)
|
#define OSDWORK_CALLBACK(name) void *name(void *param, ATTR_UNUSED int threadid)
|
||||||
|
|
||||||
class sdl_window_info : public osd_window
|
class sdl_window_info : public osd_window
|
||||||
|
Loading…
Reference in New Issue
Block a user