Skip to content

Commit 62e3d5d

Browse files
author
bittboy
committed
Console fix
1 parent 495e832 commit 62e3d5d

1 file changed

Lines changed: 19 additions & 17 deletions

File tree

simplemenu/src/logic/logic.c

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -359,23 +359,23 @@ void executeCommand(char *emulatorFolder, char *executable,
359359
if (consoleApp) {
360360
#if defined(TARGET_OD) || defined TARGET_OD_BETA
361361
/* Enable the framebuffer console */
362-
// char c = '1';
363-
// int fd = open("/sys/devices/virtual/vtconsole/vtcon1/bind", O_WRONLY);
364-
// if (fd < 0) {
365-
// printf("Unable to open fbcon handle\n");
366-
// } else {
367-
// write(fd, &c, 1);
368-
// close(fd);
369-
// }
370-
//
371-
// fd = open("/dev/tty1", O_RDWR);
372-
// if (fd < 0) {
373-
// printf("Unable to open tty1 handle\n");
374-
// } else {
375-
// if (ioctl(fd, VT_ACTIVATE, 1) < 0)
376-
// printf("Unable to activate tty1\n");
377-
// close(fd);
378-
// }
362+
char c = '1';
363+
int fd = open("/sys/devices/virtual/vtconsole/vtcon1/bind", O_WRONLY);
364+
if (fd < 0) {
365+
printf("Unable to open fbcon handle\n");
366+
} else {
367+
write(fd, &c, 1);
368+
close(fd);
369+
}
370+
371+
fd = open("/dev/tty1", O_RDWR);
372+
if (fd < 0) {
373+
printf("Unable to open tty1 handle\n");
374+
} else {
375+
if (ioctl(fd, VT_ACTIVATE, 1) < 0)
376+
printf("Unable to activate tty1\n");
377+
close(fd);
378+
}
379379
#endif
380380
}
381381

@@ -1149,12 +1149,14 @@ void loadGameList(int refresh) {
11491149
strcat(rom->name,"|");
11501150
strcat(rom->name,desktopFiles[desktopCounter].parentOPK);
11511151
strcpy(rom->alias,desktopFiles[desktopCounter].displayName);
1152+
rom->isConsoleApp = desktopFiles[desktopCounter].isConsoleApp;
11521153
#else
11531154
strcpy(rom->name,"-m|");
11541155
strcat(rom->name,desktopFiles[desktopCounter].name);
11551156
strcat(rom->name,"|");
11561157
strcat(rom->name,desktopFiles[desktopCounter].parentOPK);
11571158
strcpy(rom->alias,desktopFiles[desktopCounter].displayName);
1159+
rom->isConsoleApp = desktopFiles[desktopCounter].isConsoleApp;
11581160
#endif
11591161
loadRomPreferences(rom);
11601162
InsertAtTail(rom);

0 commit comments

Comments
 (0)