summaryrefslogtreecommitdiff
path: root/amiga/gui.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2009-06-20 13:29:30 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2009-06-20 13:29:30 +0000
commit856fde9a4e5a2c6514c7abaef1cdefc9315eb045 (patch)
tree11ba4933724b70f1df1ee248e4a5ac50d05e0d5b /amiga/gui.c
parent98092d7f16a10e5c55659942909bc797c09a2389 (diff)
downloadnetsurf-856fde9a4e5a2c6514c7abaef1cdefc9315eb045.tar.gz
netsurf-856fde9a4e5a2c6514c7abaef1cdefc9315eb045.tar.bz2
Don't ask for a screenmode when one is not set unless we actually need it.
Immediately save Options once the user has selected a screenmode. This now makes it possible to ask whether they want NetSurf to run on the Workbench or a new NetSurf screen during installation. svn path=/trunk/netsurf/; revision=7895
Diffstat (limited to 'amiga/gui.c')
-rwxr-xr-xamiga/gui.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index 53ca914d7..23b5d0311 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -486,31 +486,32 @@ void gui_init2(int argc, char** argv)
if(notalreadyrunning)
{
- if((option_modeid) && (strncmp(option_modeid,"0x",2) == 0))
- {
- id = strtoul(option_modeid,NULL,0);
- }
- else
+ if(!option_use_pubscreen || option_use_pubscreen[0] == '\0')
{
- struct ScreenModeRequester *screenmodereq = NULL;
-
- if(screenmodereq = AllocAslRequest(ASL_ScreenModeRequest,NULL))
+ if((option_modeid) && (strncmp(option_modeid,"0x",2) == 0))
{
- AslRequestTags(screenmodereq,
- ASLSM_MinDepth,24,
- ASLSM_MaxDepth,32,
- TAG_DONE);
+ id = strtoul(option_modeid,NULL,0);
+ }
+ else
+ {
+ struct ScreenModeRequester *screenmodereq = NULL;
+
+ if(screenmodereq = AllocAslRequest(ASL_ScreenModeRequest,NULL))
+ {
+ AslRequestTags(screenmodereq,
+ ASLSM_MinDepth,24,
+ ASLSM_MaxDepth,32,
+ TAG_DONE);
- id = screenmodereq->sm_DisplayID;
- option_modeid = malloc(20);
- sprintf(option_modeid,"0x%lx",id);
+ id = screenmodereq->sm_DisplayID;
+ option_modeid = malloc(20);
+ sprintf(option_modeid,"0x%lx",id);
- FreeAslRequest(screenmodereq);
+ FreeAslRequest(screenmodereq);
+ options_write("PROGDIR:Resources/Options");
+ }
}
- }
- if(!option_use_pubscreen || option_use_pubscreen[0] == '\0')
- {
scrn = OpenScreenTags(NULL,
// SA_Width,option_window_screen_width,
// SA_Height,option_window_screen_height,