Add Nintendo Switch support (including gitlab-ci, gitlab-pages etc.)

This commit is contained in:
Romain Graillot
2019-04-28 10:47:54 +02:00
parent 5d9aa6f969
commit d36e59ca9c
21 changed files with 607 additions and 7 deletions

View File

@@ -717,7 +717,7 @@ void Zoom_a_line(byte* original_line, byte* zoomed_line,
#if defined(WIN32)
#include <windows.h>
#elif defined(__macosx__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#elif defined(__macosx__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__SWITCH__)
#if defined(__OpenBSD__)
#include <sys/param.h>
#endif
@@ -785,7 +785,13 @@ unsigned long Memory_free(void)
return info.freeram*info.mem_unit;
#else
// AvailMem is misleading on os4 (os4 caches stuff in memory that you can still allocate)
#if defined(__SWITCH__)
// There is some way to get memory information on switch (see include switch/kernel/svc.h svcGetInfo svcGetSystemInfo)
// but the usage is a bit confusing for the first and the later need privilege to be used.
// If you come here with a solution, you'r welcome. For now we just return the default value.
#elif
#warning "There is missing code there for your platform ! please check and correct :)"
#endif
return 10*1024*1024;
#endif
}