mirror of
https://github.com/shagr4th/droid48
synced 2025-01-30 20:34:41 +01:00
Removed posix signal handlers from the original X48 emulator, which
seems to crash the SGS2 when main activity is paused
This commit is contained in:
parent
c4e57f0b87
commit
ad6da42290
3 changed files with 10 additions and 43 deletions
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.ab.x48" android:installLocation="auto" android:versionName="1.29" android:versionCode="29">
|
||||
package="org.ab.x48" android:installLocation="auto" android:versionCode="30" android:versionName="1.30">
|
||||
<application android:icon="@drawable/icon" android:label="@string/app_name">
|
||||
<activity android:name=".X48"
|
||||
android:label="@string/app_name"
|
||||
|
|
|
@ -2413,7 +2413,7 @@ schedule()
|
|||
#endif
|
||||
|
||||
schedule_event--;
|
||||
|
||||
/*
|
||||
if (got_alarm) {
|
||||
got_alarm = 0;
|
||||
#ifdef HAVE_XSHM
|
||||
|
@ -2422,9 +2422,9 @@ schedule()
|
|||
GetEvent();
|
||||
//usleep(500);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// GetEvent();
|
||||
GetEvent();
|
||||
}
|
||||
|
||||
int
|
||||
|
|
45
jni/main.c
45
jni/main.c
|
@ -87,30 +87,6 @@ saturn_t saturn;
|
|||
int nb;
|
||||
int exit_state = 1;
|
||||
|
||||
void
|
||||
#ifdef __FunctionProto__
|
||||
signal_handler(int sig)
|
||||
#else
|
||||
signal_handler(sig)
|
||||
int sig;
|
||||
#endif
|
||||
{
|
||||
switch (sig) {
|
||||
case SIGINT:
|
||||
enter_debugger |= USER_INTERRUPT;
|
||||
//LOGI("-sigint handler-");
|
||||
break;
|
||||
case SIGALRM:
|
||||
got_alarm = 1;
|
||||
break;
|
||||
case SIGPIPE:
|
||||
exit_x48(0);
|
||||
exit (0);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
#ifdef __FunctionProto__
|
||||
save_options(int argc, char **argv)
|
||||
|
@ -209,8 +185,6 @@ printf("%s\n", nl_langinfo(CODESET));*/
|
|||
printf("0020\n");
|
||||
|
||||
/*
|
||||
* install a handler for SIGALRM
|
||||
*/
|
||||
sigemptyset(&set);
|
||||
sigaddset(&set, SIGALRM);
|
||||
sa.sa_handler = signal_handler;
|
||||
|
@ -220,9 +194,7 @@ printf("%s\n", nl_langinfo(CODESET));*/
|
|||
#endif
|
||||
sigaction(SIGALRM, &sa, (struct sigaction *)0);
|
||||
|
||||
/*
|
||||
* install a handler for SIGINT
|
||||
*/
|
||||
|
||||
sigemptyset(&set);
|
||||
sigaddset(&set, SIGINT);
|
||||
sa.sa_handler = signal_handler;
|
||||
|
@ -232,9 +204,7 @@ printf("%s\n", nl_langinfo(CODESET));*/
|
|||
#endif
|
||||
sigaction(SIGINT, &sa, (struct sigaction *)0);
|
||||
|
||||
/*
|
||||
* install a handler for SIGPIPE
|
||||
*/
|
||||
|
||||
sigemptyset(&set);
|
||||
sigaddset(&set, SIGPIPE);
|
||||
sa.sa_handler = signal_handler;
|
||||
|
@ -244,15 +214,13 @@ printf("%s\n", nl_langinfo(CODESET));*/
|
|||
#endif
|
||||
sigaction(SIGPIPE, &sa, (struct sigaction *)0);
|
||||
|
||||
/*
|
||||
* set the real time interval timer
|
||||
*/
|
||||
|
||||
it.it_interval.tv_sec = 0;
|
||||
it.it_interval.tv_usec = 20000;
|
||||
it.it_value.tv_sec = 0;
|
||||
it.it_value.tv_usec = 20000;
|
||||
setitimer(ITIMER_REAL, &it, (struct itimerval *)0);
|
||||
|
||||
*/
|
||||
/*
|
||||
* Set stdin flags to not include O_NDELAY and O_NONBLOCK
|
||||
*/
|
||||
|
@ -263,7 +231,6 @@ printf("%s\n", nl_langinfo(CODESET));*/
|
|||
|
||||
|
||||
|
||||
|
||||
do {
|
||||
|
||||
if (!exec_flags)
|
||||
|
@ -332,7 +299,7 @@ sigset_t set;
|
|||
|
||||
init_active_stuff();
|
||||
|
||||
|
||||
/*
|
||||
sigemptyset(&set);
|
||||
sigaddset(&set, SIGALRM);
|
||||
sa.sa_handler = signal_handler;
|
||||
|
@ -369,7 +336,7 @@ sigset_t set;
|
|||
it.it_value.tv_sec = 0;
|
||||
it.it_value.tv_usec = 20000;
|
||||
setitimer(ITIMER_REAL, &it, (struct itimerval *)0);
|
||||
|
||||
*/
|
||||
|
||||
flags = fcntl(STDIN_FILENO, F_GETFL, 0);
|
||||
flags &= ~O_NDELAY;
|
||||
|
|
Loading…
Add table
Reference in a new issue