From f1508cba2c8edf3511c03f97482948fd8a4f15b4 Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Mon, 3 Feb 2014 19:34:01 +0100 Subject: [PATCH 1/5] whitespaces --- src/ginput/mouse.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ginput/mouse.c b/src/ginput/mouse.c index 4c66426f..d79d1994 100644 --- a/src/ginput/mouse.c +++ b/src/ginput/mouse.c @@ -109,7 +109,7 @@ static struct MouseConfig_t { float dx, dx0, dx1, dx2, dy0, dy1, dy2; /* 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)); 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)); 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[2].x * ((float)points[0].x * (float)points[1].y - (float)points[1].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); 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)); - 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)); 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[2].y * ((float)points[0].x * (float)points[1].y - (float)points[1].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); /* Now, calculate all the required coefficients */ c->ax = dx0 / dx; From 7f960a3c361afbc79c612f41b6b9f97e9be0113e Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Mon, 3 Feb 2014 19:41:10 +0100 Subject: [PATCH 2/5] whitespaces --- src/ginput/mouse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ginput/mouse.c b/src/ginput/mouse.c index d79d1994..d6968d47 100644 --- a/src/ginput/mouse.c +++ b/src/ginput/mouse.c @@ -128,9 +128,9 @@ static struct MouseConfig_t { 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)); - 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[2].y * ((float)points[0].x * (float)points[1].y - (float)points[1].x * (float)points[0].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[2].y * ((float)points[0].x * (float)points[1].y - (float)points[1].x * (float)points[0].y); /* Now, calculate all the required coefficients */ c->ax = dx0 / dx; From b0eb3095c0fa84fb1cdaf264dfa888596cacae3a Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Mon, 3 Feb 2014 19:43:30 +0100 Subject: [PATCH 3/5] whitespaces take 3 --- src/ginput/mouse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ginput/mouse.c b/src/ginput/mouse.c index d6968d47..8bee3499 100644 --- a/src/ginput/mouse.c +++ b/src/ginput/mouse.c @@ -122,8 +122,8 @@ static struct MouseConfig_t { 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); - 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)); + 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)); 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)); From 61c765c2fc1c7474672b722139bc3e0f8b1c752b Mon Sep 17 00:00:00 2001 From: inmarket Date: Fri, 7 Feb 2014 13:59:02 +1000 Subject: [PATCH 4/5] Removing compiler warnings from new list code --- src/gwin/list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gwin/list.c b/src/gwin/list.c index 972ea1ab..08e6a96d 100644 --- a/src/gwin/list.c +++ b/src/gwin/list.c @@ -172,6 +172,7 @@ static void gwinListDefaultDraw(GWidgetObject* gw, void* param) { const gfxQueueASyncItem* qi; int item, i; coord_t iheight; + (void) x; 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 static void MouseDown(GWidgetObject* gw, coord_t x, coord_t y) { - const gfxQueueASyncItem* qi; - int item, i, pgsz; + int pgsz; coord_t iheight; (void) x; From 3c6df9a4a1b810411d9207fd2da39c3378bb9657 Mon Sep 17 00:00:00 2001 From: inmarket Date: Fri, 7 Feb 2014 13:59:52 +1000 Subject: [PATCH 5/5] Typo in Win32 GOS --- include/gos/win32.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/gos/win32.h b/include/gos/win32.h index 2840ffcf..c704a288 100644 --- a/include/gos/win32.h +++ b/include/gos/win32.h @@ -69,11 +69,11 @@ typedef HANDLE gfxThreadHandle; #define gfxSystemTicks() GetTickCount() #define gfxMillisecondsToTicks(ms) (ms) #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 gfxMutexExit(pmutex) ReleaseMutex(*(pmutex)) #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 gfxSemSignalI(psem) ReleaseSemaphore(*(psem), 1, 0) #define gfxSemCounterI(psem) gfxSemCounter(psem)