fixed OS-X port (untested)
This commit is contained in:
parent
95b1597158
commit
ea3048ff36
@ -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);
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file include/gos/posix.h
|
||||
* @file include/gos/chibios.h
|
||||
* @brief GOS - Operating System Support header file for ChibiOS.
|
||||
*/
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user