Skip to content

Commit ee08cf3

Browse files
satyamedhVogtinator
authored andcommitted
fixed cursor showing up in lcd_compat mode
1 parent 6c668d2 commit ee08cf3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

ndless/src/resources/ploaderhook.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -371,14 +371,6 @@ int ld_exec_with_args(const char *path, int argsn, char *args[], void **resident
371371
memcpy(argvptr, args, argsn * sizeof(char*));
372372

373373
argv[argc] = NULL;
374-
375-
volatile uint32_t *cursorctrl = (volatile uint32_t*)0xC0000C00;
376-
uint32_t saved_cursorctrl = 0;
377-
if(is_cx2) {
378-
// Disable the LCDC cursor overlay
379-
saved_cursorctrl = *cursorctrl;
380-
*cursorctrl &= ~1;
381-
}
382374

383375
if (has_colors) {
384376
volatile unsigned *palette = (volatile unsigned*)0xC0000200;
@@ -387,8 +379,16 @@ int ld_exec_with_args(const char *path, int argsn, char *args[], void **resident
387379
ut_disable_watchdog(); // seems to be sometimes renabled by the OS
388380
}
389381

390-
if(!supports_hww)
382+
if(!supports_hww)
391383
lcd_compat_enable();
384+
385+
volatile uint32_t *cursorctrl = (volatile uint32_t*)0xC0000C00;
386+
uint32_t saved_cursorctrl = 0;
387+
if(is_cx2) {
388+
// Disable the LCDC cursor overlay
389+
saved_cursorctrl = *cursorctrl;
390+
*cursorctrl &= ~1;
391+
}
392392

393393
clear_cache();
394394
ret = entry(argc, argv); /* run the program */

0 commit comments

Comments
 (0)