fixed OS-X port (untested)

This commit is contained in:
Joel Bodenmann 2013-07-23 18:52:52 +02:00
parent 95b1597158
commit ea3048ff36
8 changed files with 9 additions and 9 deletions

View File

@ -138,7 +138,7 @@ bool_t gdisp_lld_init(void)
char * WindowTitleText;
gfxThreadHandle hth;
#if GFX_USE_OS_POSIX
#if GFX_USE_OS_LINUX || GFX_USE_OS_OSX
XInitThreads();
#endif
@ -206,7 +206,7 @@ bool_t gdisp_lld_init(void)
XCloseDisplay(dis);
exit(0);
}
#if GFX_USE_OS_POSIX
#if GFX_USE_OS_LINUX || GFX_USE_OS_OSX
pthread_detach(hth);
#endif
gfxThreadClose(hth);

View File

@ -11,7 +11,7 @@ and a touchscreen driver.
d) Optionally the following (with appropriate values):
#define GDISP_SCREEN_WIDTH 640
#define GDISP_SCREEN_HEIGHT 480
e) Optionally change the threading model to POSIX (instead of ChibiOS)
e) Optionally change the threading model to LINUX (instead of ChibiOS)
#define GDISP_THREAD_CHIBIOS FALSE
2. To your makefile add the following lines:

View File

@ -143,7 +143,7 @@ extern "C" {
bool_t gdispImageSetBaseFileStreamReader(gdispImage *img, void *BaseFileStreamPtr);
#endif
#if defined(WIN32) || GFX_USE_OS_WIN32 || GFX_USE_OS_POSIX || defined(__DOXYGEN__)
#if defined(WIN32) || GFX_USE_OS_WIN32 || GFX_USE_OS_LINUX || GFX_USE_OS_OSX || defined(__DOXYGEN__)
/**
* @brief Sets the io fields in the image structure to routines
* that support reading from an image stored in Win32 simulators native

View File

@ -6,7 +6,7 @@
*/
/**
* @file include/gos/posix.h
* @file include/gos/chibios.h
* @brief GOS - Operating System Support header file for ChibiOS.
*/

View File

@ -7,7 +7,7 @@
/**
* @file include/gos/osx.h
* @brief GOS - Operating System Support header file for POSIX.
* @brief GOS - Operating System Support header file for Mac OS-X.
*/
#ifndef _GOS_OSX_H

View File

@ -69,7 +69,7 @@ GHandle gwinImageCreate(GImageObject *widget, GWindowInit *pInit);
*/
bool_t gwinImageOpenMemory(GHandle gh, const void* memory);
#if defined(WIN32) || GFX_USE_OS_WIN32 || GFX_USE_OS_POSIX || defined(__DOXYGEN__)
#if defined(WIN32) || GFX_USE_OS_WIN32 || GFX_USE_OS_LINUX || GFX_USE_OS_OSX || defined(__DOXYGEN__)
/**
* @brief Sets the input routines that support reading the image from a file
* @return TRUE if the IO open function succeeds

View File

@ -117,7 +117,7 @@ bool_t gdispImageSetMemoryReader(gdispImage *img, const void *memimage) {
}
#endif
#if defined(WIN32) || GFX_USE_OS_WIN32 || GFX_USE_OS_POSIX
#if defined(WIN32) || GFX_USE_OS_WIN32 || GFX_USE_OS_LINUX
#include <stdio.h>
static size_t ImageFileRead(struct gdispImageIO *pio, void *buf, size_t len) {

View File

@ -159,7 +159,7 @@ bool_t gwinImageOpenMemory(GHandle gh, const void* memory) {
return TRUE;
}
#if defined(WIN32) || GFX_USE_OS_WIN32 || GFX_USE_OS_POSIX || defined(__DOXYGEN__)
#if defined(WIN32) || GFX_USE_OS_WIN32 || GFX_USE_OS_LINUX || GFX_USE_OS_OSX || defined(__DOXYGEN__)
bool_t gwinImageOpenFile(GHandle gh, const char* filename) {
if (gdispImageIsOpen(&widget(gh)->image))
gdispImageClose(&widget(gh)->image);