mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
Merge pull request #7311 from m4xw/libnx
[LIBNX] GL by default, enable XMB, rgui color changes for Libnx only
This commit is contained in:
commit
f7e4f440c8
@ -43,7 +43,7 @@ HAVE_PTHREADS = 1
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_SWITCH = 1
|
||||
HAVE_LIBNX = 1
|
||||
HAVE_OPENGL = 0
|
||||
HAVE_OPENGL = 1
|
||||
|
||||
ifeq ($(HAVE_OPENGL), 1)
|
||||
HAVE_EGL = 1
|
||||
@ -53,7 +53,7 @@ ifeq ($(HAVE_OPENGL), 1)
|
||||
HAVE_MATERIALUI = 1
|
||||
|
||||
HAVE_ZARCH = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_XMB = 1
|
||||
HAVE_STRIPES = 0
|
||||
|
||||
HAVE_OVERLAY = 1
|
||||
|
@ -57,36 +57,24 @@ static INLINE ThreadVars *getThreadVars(void)
|
||||
return (ThreadVars *)((u8 *)armGetTls() + 0x1E0);
|
||||
}
|
||||
|
||||
#define STACKSIZE (8 * 1024)
|
||||
|
||||
/* libnx threads return void but pthreads return void pointer */
|
||||
|
||||
#define STACKSIZE (128 * 1024)
|
||||
static uint32_t threadCounter = 1;
|
||||
|
||||
int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)
|
||||
{
|
||||
u32 prio = 0;
|
||||
u64 core_mask = 0;
|
||||
|
||||
Thread new_switch_thread;
|
||||
|
||||
svcGetThreadPriority(&prio, CUR_THREAD_HANDLE);
|
||||
svcGetInfo(&core_mask, 0, CUR_PROCESS_HANDLE, 0);
|
||||
|
||||
// Launch threads on Core 1
|
||||
int rc = threadCreate(&new_switch_thread, (void (*)(void *))start_routine, arg, STACKSIZE, prio - 1, -2);
|
||||
int rc = threadCreate(&new_switch_thread, (void (*)(void *))start_routine, arg, STACKSIZE, prio - 1, 1);
|
||||
|
||||
if (R_FAILED(rc))
|
||||
{
|
||||
return EAGAIN;
|
||||
}
|
||||
|
||||
rc = svcSetThreadCoreMask(new_switch_thread.handle, -1, core_mask);
|
||||
if (R_FAILED(rc))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("[Threading]: Starting Thread(#%i)\n", threadCounter);
|
||||
if (R_FAILED(threadStart(&new_switch_thread)))
|
||||
{
|
||||
|
@ -95,7 +95,7 @@ static uint16_t rgui_gray_filler(rgui_t *rgui, unsigned x, unsigned y)
|
||||
unsigned col = (((x >> shft) + (y >> shft)) & 1) + 1;
|
||||
#if defined(GEKKO) || defined(PSP)
|
||||
return (6 << 12) | (col << 8) | (col << 4) | (col << 0);
|
||||
#elif defined(SWITCH)
|
||||
#elif defined(HAVE_LIBNX) && !defined(HAVE_OPENGL)
|
||||
return (((31 * (54)) / 255) << 11) |
|
||||
(((63 * (54)) / 255) << 5) |
|
||||
((31 * (54)) / 255);
|
||||
@ -110,7 +110,7 @@ static uint16_t rgui_green_filler(rgui_t *rgui, unsigned x, unsigned y)
|
||||
unsigned col = (((x >> shft) + (y >> shft)) & 1) + 1;
|
||||
#if defined(GEKKO) || defined(PSP)
|
||||
return (6 << 12) | (col << 8) | (col << 5) | (col << 0);
|
||||
#elif defined(SWITCH)
|
||||
#elif defined(HAVE_LIBNX) && !defined(HAVE_OPENGL)
|
||||
return (((31 * (54)) / 255) << 11) |
|
||||
(((63 * (109)) / 255) << 5) |
|
||||
((31 * (54)) / 255);
|
||||
|
Loading…
x
Reference in New Issue
Block a user