Merge branch 'master' into gwin
This commit is contained in:
commit
84fc1ac166
@ -69,11 +69,11 @@ typedef HANDLE gfxThreadHandle;
|
|||||||
#define gfxSystemTicks() GetTickCount()
|
#define gfxSystemTicks() GetTickCount()
|
||||||
#define gfxMillisecondsToTicks(ms) (ms)
|
#define gfxMillisecondsToTicks(ms) (ms)
|
||||||
#define gfxMutexInit(pmutex) *(pmutex) = CreateMutex(0, FALSE, 0)
|
#define gfxMutexInit(pmutex) *(pmutex) = CreateMutex(0, FALSE, 0)
|
||||||
#define gfxMutexDestory(pmutex) CloseHandle(*(pmutex))
|
#define gfxMutexDestroy(pmutex) CloseHandle(*(pmutex))
|
||||||
#define gfxMutexEnter(pmutex) WaitForSingleObject(*(pmutex), INFINITE)
|
#define gfxMutexEnter(pmutex) WaitForSingleObject(*(pmutex), INFINITE)
|
||||||
#define gfxMutexExit(pmutex) ReleaseMutex(*(pmutex))
|
#define gfxMutexExit(pmutex) ReleaseMutex(*(pmutex))
|
||||||
#define gfxSemInit(psem, val, limit) *(psem) = CreateSemaphore(0, val, limit, 0)
|
#define gfxSemInit(psem, val, limit) *(psem) = CreateSemaphore(0, val, limit, 0)
|
||||||
#define gfxSemDestory(psem) CloseHandle(*(psem))
|
#define gfxSemDestroy(psem) CloseHandle(*(psem))
|
||||||
#define gfxSemSignal(psem) ReleaseSemaphore(*(psem), 1, 0)
|
#define gfxSemSignal(psem) ReleaseSemaphore(*(psem), 1, 0)
|
||||||
#define gfxSemSignalI(psem) ReleaseSemaphore(*(psem), 1, 0)
|
#define gfxSemSignalI(psem) ReleaseSemaphore(*(psem), 1, 0)
|
||||||
#define gfxSemCounterI(psem) gfxSemCounter(psem)
|
#define gfxSemCounterI(psem) gfxSemCounter(psem)
|
||||||
|
@ -109,7 +109,7 @@ static struct MouseConfig_t {
|
|||||||
float dx, dx0, dx1, dx2, dy0, dy1, dy2;
|
float dx, dx0, dx1, dx2, dy0, dy1, dy2;
|
||||||
|
|
||||||
/* Compute all the required determinants */
|
/* Compute all the required determinants */
|
||||||
dx = ((float)(points[0].x - points[2].x)) * ((float)(points[1].y - points[2].y))
|
dx = ((float)(points[0].x - points[2].x)) * ((float)(points[1].y - points[2].y))
|
||||||
- ((float)(points[1].x - points[2].x)) * ((float)(points[0].y - points[2].y));
|
- ((float)(points[1].x - points[2].x)) * ((float)(points[0].y - points[2].y));
|
||||||
|
|
||||||
dx0 = ((float)(cross[0].x - cross[2].x)) * ((float)(points[1].y - points[2].y))
|
dx0 = ((float)(cross[0].x - cross[2].x)) * ((float)(points[1].y - points[2].y))
|
||||||
@ -119,18 +119,18 @@ static struct MouseConfig_t {
|
|||||||
- ((float)(cross[0].x - cross[2].x)) * ((float)(points[1].x - points[2].x));
|
- ((float)(cross[0].x - cross[2].x)) * ((float)(points[1].x - points[2].x));
|
||||||
|
|
||||||
dx2 = cross[0].x * ((float)points[1].x * (float)points[2].y - (float)points[2].x * (float)points[1].y) -
|
dx2 = cross[0].x * ((float)points[1].x * (float)points[2].y - (float)points[2].x * (float)points[1].y) -
|
||||||
cross[1].x * ((float)points[0].x * (float)points[2].y - (float)points[2].x * (float)points[0].y) +
|
cross[1].x * ((float)points[0].x * (float)points[2].y - (float)points[2].x * (float)points[0].y) +
|
||||||
cross[2].x * ((float)points[0].x * (float)points[1].y - (float)points[1].x * (float)points[0].y);
|
cross[2].x * ((float)points[0].x * (float)points[1].y - (float)points[1].x * (float)points[0].y);
|
||||||
|
|
||||||
dy0 = ((float)(cross[0].y - cross[2].y)) * ((float)(points[1].y - points[2].y))
|
dy0 = ((float)(cross[0].y - cross[2].y)) * ((float)(points[1].y - points[2].y))
|
||||||
- ((float)(cross[1].y - cross[2].y)) * ((float)(points[0].y - points[2].y));
|
- ((float)(cross[1].y - cross[2].y)) * ((float)(points[0].y - points[2].y));
|
||||||
|
|
||||||
dy1 = ((float)(cross[1].y - cross[2].y)) * ((float)(points[0].x - points[2].x))
|
dy1 = ((float)(cross[1].y - cross[2].y)) * ((float)(points[0].x - points[2].x))
|
||||||
- ((float)(cross[0].y - cross[2].y)) * ((float)(points[1].x - points[2].x));
|
- ((float)(cross[0].y - cross[2].y)) * ((float)(points[1].x - points[2].x));
|
||||||
|
|
||||||
dy2 = cross[0].y * ((float)points[1].x * (float)points[2].y - (float)points[2].x * (float)points[1].y) -
|
dy2 = cross[0].y * ((float)points[1].x * (float)points[2].y - (float)points[2].x * (float)points[1].y) -
|
||||||
cross[1].y * ((float)points[0].x * (float)points[2].y - (float)points[2].x * (float)points[0].y) +
|
cross[1].y * ((float)points[0].x * (float)points[2].y - (float)points[2].x * (float)points[0].y) +
|
||||||
cross[2].y * ((float)points[0].x * (float)points[1].y - (float)points[1].x * (float)points[0].y);
|
cross[2].y * ((float)points[0].x * (float)points[1].y - (float)points[1].x * (float)points[0].y);
|
||||||
|
|
||||||
/* Now, calculate all the required coefficients */
|
/* Now, calculate all the required coefficients */
|
||||||
c->ax = dx0 / dx;
|
c->ax = dx0 / dx;
|
||||||
|
@ -172,6 +172,7 @@ static void gwinListDefaultDraw(GWidgetObject* gw, void* param) {
|
|||||||
const gfxQueueASyncItem* qi;
|
const gfxQueueASyncItem* qi;
|
||||||
int item, i;
|
int item, i;
|
||||||
coord_t iheight;
|
coord_t iheight;
|
||||||
|
(void) x;
|
||||||
|
|
||||||
iheight = gdispGetFontMetric(gw->g.font, fontHeight) + VERTICAL_PADDING;
|
iheight = gdispGetFontMetric(gw->g.font, fontHeight) + VERTICAL_PADDING;
|
||||||
|
|
||||||
@ -202,8 +203,7 @@ static void gwinListDefaultDraw(GWidgetObject* gw, void* param) {
|
|||||||
|
|
||||||
// a mouse down has occurred over the list area
|
// a mouse down has occurred over the list area
|
||||||
static void MouseDown(GWidgetObject* gw, coord_t x, coord_t y) {
|
static void MouseDown(GWidgetObject* gw, coord_t x, coord_t y) {
|
||||||
const gfxQueueASyncItem* qi;
|
int pgsz;
|
||||||
int item, i, pgsz;
|
|
||||||
coord_t iheight;
|
coord_t iheight;
|
||||||
(void) x;
|
(void) x;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user