From 7e0ed132f7d3edb1681badc1fadaf5a0812d7768 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 16 Apr 2017 17:49:27 +0100 Subject: Adjust the requested class versions to be the minimum required. Some features of later versions are used but are either restricted to OS4 only, or runtime version checks select the appropriate routines. Where the lowest required version cannot be determined, the version provided in the ClassAct 3.3 archive is requested. Bugs may mean these older classes do not work as expected. In addition, restrict the opening of listbrowser.gadget and the custom Stringview class to OS4 only. --- frontends/amiga/gui.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'frontends/amiga/gui.c') diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c index 4b6daa778..657227459 100644 --- a/frontends/amiga/gui.c +++ b/frontends/amiga/gui.c @@ -17,10 +17,11 @@ */ - +#ifdef __amigaos4__ /* Custom StringView class */ #include "amiga/stringview/stringview.h" #include "amiga/stringview/urlhistory.h" +#endif /* AmigaOS libraries */ #ifdef __amigaos4__ @@ -196,7 +197,9 @@ static bool ami_quit = false; static struct MsgPort *schedulermsgport = NULL; static struct MsgPort *appport; +#ifdef __amigaos4__ static Class *urlStringClass; +#endif static BOOL locked_screen = FALSE; static int screen_signal = -1; @@ -439,7 +442,9 @@ static void ami_gui_resources_free(void) static bool ami_gui_resources_open(void) { +#ifdef __amigaos4__ urlStringClass = MakeStringClass(); +#endif if(!(appport = AllocSysObjectTags(ASOT_PORT, ASO_NoTrack, FALSE, @@ -3058,7 +3063,9 @@ static void gui_quit(void) ami_file_req_free(); ami_openurl_close(); +#ifdef __amigaos4__ FreeStringClass(urlStringClass); +#endif FreeObjList(window_list); -- cgit v1.2.3