Added GUI pol timeout selection popup.
The user must decide for himself. Default to 0, which eats GUI resources but speeds-up rendering.
This commit is contained in:
parent
65ebba7b51
commit
418a6f7edd
|
@ -125,7 +125,7 @@ void gui_poll(bool active)
|
||||||
aes_event_in.emi_tlow = schedule_run();
|
aes_event_in.emi_tlow = schedule_run();
|
||||||
|
|
||||||
if(active || rendering){
|
if(active || rendering){
|
||||||
aes_event_in.emi_tlow = 10;
|
aes_event_in.emi_tlow = nsoption_int(atari_gui_poll_timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(aes_event_in.emi_tlow < 0) {
|
if(aes_event_in.emi_tlow < 0) {
|
||||||
|
|
|
@ -28,6 +28,7 @@ NSOPTION_STRING(atari_font_driver, "freetype")
|
||||||
NSOPTION_INTEGER(atari_font_monochrom, 0)
|
NSOPTION_INTEGER(atari_font_monochrom, 0)
|
||||||
NSOPTION_INTEGER(atari_transparency, 1)
|
NSOPTION_INTEGER(atari_transparency, 1)
|
||||||
NSOPTION_INTEGER(atari_dither, 1)
|
NSOPTION_INTEGER(atari_dither, 1)
|
||||||
|
NSOPTION_INTEGER(atari_gui_poll_timeout, 0)
|
||||||
NSOPTION_STRING(atari_editor, NULL)
|
NSOPTION_STRING(atari_editor, NULL)
|
||||||
NSOPTION_STRING(font_face_sans_serif, NULL)
|
NSOPTION_STRING(font_face_sans_serif, NULL)
|
||||||
NSOPTION_STRING(font_face_sans_serif_bold, NULL)
|
NSOPTION_STRING(font_face_sans_serif_bold, NULL)
|
||||||
|
|
Binary file not shown.
|
@ -194,6 +194,7 @@
|
||||||
#define SETTINGS_DEC_HISTORY_AGE 89 /* BOXCHAR in tree SETTINGS */
|
#define SETTINGS_DEC_HISTORY_AGE 89 /* BOXCHAR in tree SETTINGS */
|
||||||
#define SETTINGS_EDIT_HISTORY_AGE 90 /* FTEXT in tree SETTINGS */
|
#define SETTINGS_EDIT_HISTORY_AGE 90 /* FTEXT in tree SETTINGS */
|
||||||
#define SETTINGS_INC_HISTORY_AGE 91 /* BOXCHAR in tree SETTINGS */
|
#define SETTINGS_INC_HISTORY_AGE 91 /* BOXCHAR in tree SETTINGS */
|
||||||
|
#define SETTINGS_BT_GUI_TOUT 94 /* BUTTON in tree SETTINGS */
|
||||||
|
|
||||||
#define POP_LANGUAGE 14 /* form/dial */
|
#define POP_LANGUAGE 14 /* form/dial */
|
||||||
#define POP_LANGUAGE_CS 1 /* STRING in tree POP_LANGUAGE */
|
#define POP_LANGUAGE_CS 1 /* STRING in tree POP_LANGUAGE */
|
||||||
|
|
|
@ -3,7 +3,7 @@ ResourceMaster v3.65
|
||||||
#N 99@32@AZAaza___ _@AZAaza090___ _@@_@
|
#N 99@32@AZAaza___ _@AZAaza090___ _@@_@
|
||||||
#FoC-Header@rsm2out@C-Header@rsh@@@[C-Header@0@
|
#FoC-Header@rsm2out@C-Header@rsh@@@[C-Header@0@
|
||||||
#R 0@0@1@1@2@1@
|
#R 0@0@1@1@2@1@
|
||||||
#M 20010100@0@7728@654@
|
#M 20010100@0@7728@655@
|
||||||
#T 0@1@MAINMENU@@64@@
|
#T 0@1@MAINMENU@@64@@
|
||||||
#O 4@32@T_FILE@@
|
#O 4@32@T_FILE@@
|
||||||
#O 5@32@T_EDIT@@
|
#O 5@32@T_EDIT@@
|
||||||
|
@ -128,7 +128,7 @@ ResourceMaster v3.65
|
||||||
#O 5@33@BT_DOWN_PIC@@
|
#O 5@33@BT_DOWN_PIC@@
|
||||||
#O 6@25@BT_UP@@
|
#O 6@25@BT_UP@@
|
||||||
#O 4@33@BT_UP_PIC@@
|
#O 4@33@BT_UP_PIC@@
|
||||||
#T 13@2@SETTINGS@@93@@
|
#T 13@2@SETTINGS@@96@@
|
||||||
#O 1@26@SAVE@@
|
#O 1@26@SAVE@@
|
||||||
#O 2@26@ABORT@@
|
#O 2@26@ABORT@@
|
||||||
#O 5@29@EDIT_DOWNLOAD_PATH@@
|
#O 5@29@EDIT_DOWNLOAD_PATH@@
|
||||||
|
@ -183,6 +183,7 @@ ResourceMaster v3.65
|
||||||
#O 89@27@DEC_HISTORY_AGE@@
|
#O 89@27@DEC_HISTORY_AGE@@
|
||||||
#O 90@29@EDIT_HISTORY_AGE@@
|
#O 90@29@EDIT_HISTORY_AGE@@
|
||||||
#O 91@27@INC_HISTORY_AGE@@
|
#O 91@27@INC_HISTORY_AGE@@
|
||||||
|
#O 94@26@BT_GUI_TOUT@@
|
||||||
#T 14@2@POP_LANGUAGE@@16@@
|
#T 14@2@POP_LANGUAGE@@16@@
|
||||||
#O 1@28@CS@@
|
#O 1@28@CS@@
|
||||||
#O 2@28@DE@@
|
#O 2@28@DE@@
|
||||||
|
@ -203,4 +204,4 @@ ResourceMaster v3.65
|
||||||
#T 16@2@TOOLBAR_HISTORY@@1@@
|
#T 16@2@TOOLBAR_HISTORY@@1@@
|
||||||
#T 17@2@TOOLBAR_SSL_CERT@@2@@
|
#T 17@2@TOOLBAR_SSL_CERT@@2@@
|
||||||
#O 1@26@TRUSTED@@
|
#O 1@26@TRUSTED@@
|
||||||
#c 27986@
|
#c 29166@
|
||||||
|
|
|
@ -59,6 +59,11 @@ static const char *font_engines[] = {
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Available GUI timeouts for the timeout selection popup: */
|
||||||
|
static const char *gui_timeouts[] = {
|
||||||
|
"0", "5", "10"
|
||||||
|
};
|
||||||
|
|
||||||
#define OBJ_SELECTED(idx) ((bool)((dlgtree[idx].ob_state & OS_SELECTED)!=0))
|
#define OBJ_SELECTED(idx) ((bool)((dlgtree[idx].ob_state & OS_SELECTED)!=0))
|
||||||
|
|
||||||
#define OBJ_CHECK(idx) (dlgtree[idx].ob_state |= (OS_SELECTED));
|
#define OBJ_CHECK(idx) (dlgtree[idx].ob_state |= (OS_SELECTED));
|
||||||
|
@ -220,6 +225,9 @@ static void display_settings(void)
|
||||||
nsoption_charp(accept_language) ? nsoption_charp(accept_language) : (char*)"en",
|
nsoption_charp(accept_language) ? nsoption_charp(accept_language) : (char*)"en",
|
||||||
INPUT_LOCALE_MAX_LEN );
|
INPUT_LOCALE_MAX_LEN );
|
||||||
|
|
||||||
|
sprintf(spare, "%d", nsoption_int(atari_gui_poll_timeout));
|
||||||
|
set_text(SETTINGS_BT_GUI_TOUT, spare, 2);
|
||||||
|
|
||||||
tmp_option_expire_url = nsoption_int(expire_url);
|
tmp_option_expire_url = nsoption_int(expire_url);
|
||||||
snprintf( spare, 255, "%02d", nsoption_int(expire_url) );
|
snprintf( spare, 255, "%02d", nsoption_int(expire_url) );
|
||||||
set_text( SETTINGS_EDIT_HISTORY_AGE, spare, 2 );
|
set_text( SETTINGS_EDIT_HISTORY_AGE, spare, 2 );
|
||||||
|
@ -446,6 +454,28 @@ static void form_event(int index, int external)
|
||||||
OBJ_REDRAW(SETTINGS_BT_SEL_LOCALE);
|
OBJ_REDRAW(SETTINGS_BT_SEL_LOCALE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SETTINGS_BT_GUI_TOUT:
|
||||||
|
objc_offset(dlgtree, SETTINGS_BT_GUI_TOUT, &x, &y);
|
||||||
|
tmp = gemtk_obj_get_text(dlgtree, SETTINGS_BT_GUI_TOUT);
|
||||||
|
pop_menu.mn_tree = gemtk_obj_create_popup_tree(gui_timeouts,
|
||||||
|
NOF_ELEMENTS(gui_timeouts), tmp, false, -1,
|
||||||
|
100);
|
||||||
|
|
||||||
|
pop_menu.mn_item = 0;
|
||||||
|
pop_menu.mn_menu = 0;
|
||||||
|
pop_menu.mn_scroll = SCROLL_NO;
|
||||||
|
pop_menu.mn_keystate = 0;
|
||||||
|
|
||||||
|
menu_popup(&pop_menu, x, y, &me_data);
|
||||||
|
choice = me_data.mn_item;
|
||||||
|
if( choice > 0 && choice <= NOF_ELEMENTS(gui_timeouts) ) {
|
||||||
|
get_string(pop_menu.mn_tree, choice, spare);
|
||||||
|
set_text(SETTINGS_BT_GUI_TOUT, (char*)&spare[2], 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
OBJ_REDRAW(SETTINGS_BT_GUI_TOUT);
|
||||||
|
break;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
case SETTINGS_INPUT_TOOLBAR_BGCOLOR:
|
case SETTINGS_INPUT_TOOLBAR_BGCOLOR:
|
||||||
objc_offset( FORM(win), SETTINGS_INPUT_TOOLBAR_BGCOLOR, &x, &y );
|
objc_offset( FORM(win), SETTINGS_INPUT_TOOLBAR_BGCOLOR, &x, &y );
|
||||||
|
@ -701,6 +731,8 @@ static void apply_settings(void)
|
||||||
gemtk_obj_get_text(dlgtree, SETTINGS_BT_SEL_LOCALE));
|
gemtk_obj_get_text(dlgtree, SETTINGS_BT_SEL_LOCALE));
|
||||||
nsoption_set_int(expire_url,
|
nsoption_set_int(expire_url,
|
||||||
atoi(gemtk_obj_get_text(dlgtree, SETTINGS_EDIT_HISTORY_AGE)));
|
atoi(gemtk_obj_get_text(dlgtree, SETTINGS_EDIT_HISTORY_AGE)));
|
||||||
|
nsoption_set_int(atari_gui_poll_timeout,
|
||||||
|
atoi(gemtk_obj_get_text(dlgtree, SETTINGS_BT_GUI_TOUT)));
|
||||||
nsoption_set_bool(send_referer,
|
nsoption_set_bool(send_referer,
|
||||||
OBJ_SELECTED(SETTINGS_CB_SEND_HTTP_REFERRER));
|
OBJ_SELECTED(SETTINGS_CB_SEND_HTTP_REFERRER));
|
||||||
nsoption_set_bool(do_not_track,
|
nsoption_set_bool(do_not_track,
|
||||||
|
|
Loading…
Reference in New Issue