IPHONE: Move ObjC code files (.m) to ObjC++ files (.mm).

This commit is contained in:
Johannes Schickel 2012-02-22 02:30:44 +01:00
parent 1b26346fc8
commit e79f6a6314
5 changed files with 5 additions and 23 deletions

View File

@ -50,27 +50,13 @@ enum UIViewSwipeDirection {
kUIViewSwipeRight = 8
};
typedef enum {
enum GraphicsModes {
kGraphicsModeLinear = 0,
kGraphicsModeNone = 1
} GraphicsModes;
#ifdef IPHONE_OFFICIAL
void iphone_main(int argc, char **argv);
#endif
// We need this to be able to call functions from/in Objective-C.
#ifdef __cplusplus
extern "C" {
#endif
// On the C++ side
#ifndef IPHONE_OFFICIAL
void iphone_main(int argc, char *argv[]);
#endif
};
// On the ObjC side
void iPhone_setGraphicsMode(int mode);
void iPhone_setGraphicsMode(GraphicsModes mode);
void iPhone_updateScreen(int mouseX, int mouseY);
void iPhone_updateScreenRect(unsigned short *screen, int x1, int y1, int x2, int y2);
void iPhone_updateOverlayRect(unsigned short *screen, int x1, int y1, int x2, int y2);
@ -87,8 +73,4 @@ void iPhone_setMouseCursor(unsigned short *buffer, int width, int height, int ho
uint getSizeNextPOT(uint size);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -83,7 +83,7 @@ int printOglError(const char *file, int line) {
return retCode;
}
void iPhone_setGraphicsMode(int mode) {
void iPhone_setGraphicsMode(GraphicsModes mode) {
_graphicsMode = mode;
[sharedInstance performSelectorOnMainThread:@selector(setGraphicsMode) withObject:nil waitUntilDone: YES];

View File

@ -39,7 +39,7 @@ bool OSystem_IPHONE::setGraphicsMode(int mode) {
case kGraphicsModeNone:
case kGraphicsModeLinear:
_currentGraphicsMode = mode;
iPhone_setGraphicsMode(mode);
iPhone_setGraphicsMode((GraphicsModes)mode);
return true;
default: