Initial Vita port.#818
Conversation
| } | ||
|
|
||
| // fnmatch is missing from vita newlib, this is here until otherwise. | ||
| int fnmatch(const char *pattern, const char *string, int flags) |
There was a problem hiding this comment.
What is interesting in this is that I also had to provide an fnmatch implementation for fnmatch, which I stole from newlib. I think this can be refactored later to use newlib's implementation of fnmatch
| #define basename basename_vita | ||
|
|
||
| // fails to link due to undefined basename. old newlib? | ||
| static char* basename_vita(const char* filename) |
There was a problem hiding this comment.
Same thing here. Maybe we should test if the platform has a basename implementation on build time?
| #ifdef VITA | ||
| #include <SDL.h> | ||
|
|
||
| const int32_t VITA_FULLSCREEN_WIDTH = 960; |
There was a problem hiding this comment.
Maybe one of the vita headers already declare that? Libnds does for Nintendo DS at least.
| } | ||
| } | ||
|
|
||
| #ifndef VITA |
There was a problem hiding this comment.
I also had to remove some of those functions, as they were already provided by the toolchain libs. I think the best way is to leave cmake detect those.
| // Variables for helping track how much time goes bye in routines | ||
| // | ||
| #ifndef VITA | ||
| //multiple definition of `LogLevel' with openal vita port. |
There was a problem hiding this comment.
Rename the variable. I did the same thing with Keyboard, which aliased with typedef struct <> Keyboard from libnds.
| #endif | ||
|
|
||
| #ifdef VITA | ||
| int _newlib_heap_size_user = 340 * 1024 * 1024; |
There was a problem hiding this comment.
I wonder why he had to increase the HeapSize to 340Mb?
| #ifdef VITA | ||
| const char* progpath = "ux0:data"; | ||
| #else | ||
| const char* progpath = args.ArgV[0]; |
There was a problem hiding this comment.
I remember fixing this on my NDS branch without having to do this on startup.
| #endif | ||
|
|
||
| #ifdef VITA | ||
| int _newlib_heap_size_user = 340 * 1024 * 1024; |
There was a problem hiding this comment.
Move it to some of the vita specific files?
| int main(int argc, char** argv) | ||
| { | ||
| #ifdef VITA | ||
| scePowerSetArmClockFrequency(444); |
There was a problem hiding this comment.
CPU speed could be set in some of the VITA specific files. For instance, on my NDS Branch I set the ARM9 on Set_Video_Mode(), and all hardware specific initialization is done there.
4f5da3f to
5e6f503
Compare
Based on Northfear's work for the Kyuhen homebrew contest.
5e6f503 to
4cb9e04
Compare
Based on Northfear's work for the Kyuhen homebrew contest and subsequent improvements.
https://github.com/Northfear/Vanilla-Conquer-vita