This commit is contained in:
RobertoFresca 2016-02-28 01:01:49 -03:00
commit c2d565062c
4 changed files with 11 additions and 22 deletions

View File

@ -11,6 +11,7 @@
#include "sdlinc.h"
// standard C headers
#include <cstdint>
#include <unistd.h>
#include <sys/types.h>
#include <signal.h>
@ -175,11 +176,7 @@ static int worker_thread_entry(void *param)
void *res;
res = thread->callback(thread->param);
#ifdef PTR64
return (int) (INT64) res;
#else
return (int) res;
#endif
return int(intptr_t(res));
}
osd_thread *osd_thread_create(osd_thread_callback callback, void *cbparam)

View File

@ -17,6 +17,9 @@
#include "eminline.h"
#include "osdsync.h"
// C++ headers
#include <cstdint>
//============================================================
// DEBUGGING
@ -144,11 +147,7 @@ static unsigned __stdcall worker_thread_entry(void *param)
osd_thread *thread = (osd_thread *) param;
void *res;
res = thread->callback(thread->param);
#ifdef PTR64
return (unsigned) (long long) res;
#else
return (unsigned) res;
#endif
return unsigned(uintptr_t(res));
}
osd_thread *osd_thread_create(osd_thread_callback callback, void *cbparam)

View File

@ -88,11 +88,7 @@ using INT64 = signed long long;
#endif
/* pointer-sized values */
#ifdef PTR64
using FPTR = UINT64;
#else
using FPTR = UINT32;
#endif
using FPTR = uintptr_t;

View File

@ -17,18 +17,15 @@
#include "modules/osdwindow.h"
// I don't like this, but we're going to get spurious "cast to integer of different size" warnings on
// at least one architecture without doing it this way.
#ifdef PTR64
typedef UINT64 HashT;
#else
typedef UINT32 HashT;
#endif
#include <cstdint>
//============================================================
// TYPE DEFINITIONS
//============================================================
typedef uintptr_t HashT;
#define OSDWORK_CALLBACK(name) void *name(void *param, ATTR_UNUSED int threadid)
class sdl_window_info : public osd_window