From: Toni Wilen Date: Sun, 3 Sep 2006 07:29:26 +0000 (+0300) Subject: imported winuaesrc1320.zip X-Git-Tag: 2100~273 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=2fee235b3a207e46f0a010dfd1d7a2a7c7d2277b;p=francis%2Fwinuae.git imported winuaesrc1320.zip --- diff --git a/od-win32/WinUAE_Install.nsi b/od-win32/WinUAE_Install.nsi index be138ebb..def65d6f 100755 --- a/od-win32/WinUAE_Install.nsi +++ b/od-win32/WinUAE_Install.nsi @@ -1,5 +1,5 @@ !define PRODUCT_NAME "WinUAE" -!define PRODUCT_VERSION "1.3.0" +!define PRODUCT_VERSION "1.3.2" !define PRODUCT_PUBLISHER "Toni Wilen" !define PRODUCT_WEB_SITE "http://www.winuae.net/" !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\winuae.exe" diff --git a/od-win32/parser.c b/od-win32/parser.c index e5bcf4b7..fba6ddf6 100755 --- a/od-win32/parser.c +++ b/od-win32/parser.c @@ -7,8 +7,6 @@ * Copyright 1998-1999 Brian King - added MIDI output support */ -//#define PS_PRINT_DUMP - #include "config.h" #include "sysconfig.h" #include @@ -56,7 +54,7 @@ static DWORD dwJob; extern HWND hAmigaWnd; static int prtopen; extern void flushpixels(void); -void DoSomeWeirdPrintingStuff( char val ); +void DoSomeWeirdPrintingStuff(char val); static int uartbreak; static int parflush; @@ -65,9 +63,8 @@ static volatile int prt_running; static volatile int prt_started; static smp_comm_pipe prt_requests; -#ifdef PS_PRINT_DUMP +int postscript_print_debugging = 0; static struct zfile *prtdump; -#endif static int psmode = 0; static HMODULE gsdll; @@ -133,10 +130,20 @@ static int openprinter_ps (void) for (gsargc = 0; gsargv[gsargc]; gsargc++); for (i = 0; i < gsargc; i++) tmpparms[gsargc2++] = gsargv[i]; - sprintf (tmp, "-sOutputFile=%%printer%%%s", currprefs.prtname); - tmpparms[gsargc2++] = tmp; + if (currprefs.prtname[0]) { + sprintf (tmp, "-sOutputFile=%%printer%%%s", currprefs.prtname); + tmpparms[gsargc2++] = tmp; + } + if (postscript_print_debugging) { + for(i = 0; i < gsargc2; i++) + write_log("GSPARM%d: '%s'\n", i, tmpparms[i]); + } __try { - ptr_gsapi_init_with_args (gsinstance, gsargc2, tmpparms); + int rc = ptr_gsapi_init_with_args (gsinstance, gsargc2, tmpparms); + if (rc != 0) { + write_log("GS failed, returncode %d\n", rc); + return 0; + } ptr_gsapi_run_string_begin (gsinstance, 0, &gs_exitcode); } __except(ExceptionFilter(GetExceptionInformation(), GetExceptionCode())) { write_log("GS crashed\n"); @@ -198,10 +205,9 @@ static void flushprtbuf (void) if (!prtbufbytes) return; -#ifdef PS_PRINT_DUMP - if (prtdump) + if (postscript_print_debugging && prtdump) zfile_fwrite (prtbuf, prtbufbytes, 1, prtdump); -#endif + if (currprefs.parallel_postscript_emulation) { if (psmode) { uae_u8 *p; @@ -248,10 +254,12 @@ static void DoSomeWeirdPrintingStuff (char val) prtbufbytes = 1; flushprtbuf (); write_log ("PostScript end detected..\n"); -#ifdef PS_PRINT_DUMP - zfile_fclose (prtdump); - prtdump = NULL; -#endif + + if (postscript_print_debugging) { + zfile_fclose (prtdump); + prtdump = NULL; + } + if (currprefs.parallel_postscript_emulation) { prt_started = 0; if (uae_start_thread (prt_thread, psbuffer, &prt_tid)) { @@ -266,9 +274,10 @@ static void DoSomeWeirdPrintingStuff (char val) freepsbuffers (); return; } else if (!psmode && !stricmp (prev, "%!PS")) { -#ifdef PS_PRINT_DUMP - prtdump = zfile_fopen ("psdump.dat", "wb"); -#endif + + if (postscript_print_debugging) + prtdump = zfile_fopen ("psdump.dat", "wb"); + psmode = 1; psbuffer = malloc (sizeof (uae_u8*)); psbuffer[0] = 0; @@ -314,7 +323,8 @@ int load_ghostscript (void) if (gsdll) return 1; - gsdll = WIN32_LoadLibrary ("gsdll32.dll"); + strcpy(path, "gsdll32.dll"); + gsdll = WIN32_LoadLibrary (path); if (!gsdll) { if (GetEnvironmentVariable ("GS_DLL", path, sizeof (path))) gsdll = LoadLibrary (path); @@ -350,12 +360,12 @@ int load_ghostscript (void) ptr_gsapi_revision = (GSAPI_REVISION)GetProcAddress (gsdll, "gsapi_revision"); if (!ptr_gsapi_revision) { unload_ghostscript (); - write_log("incompatible gsdll32.dll! (1)\n"); + write_log("incompatible %s! (1)\n", path); return -1; } if (ptr_gsapi_revision(&r, sizeof(r))) { unload_ghostscript (); - write_log("incompatible gsdll32.dll! (2)\n"); + write_log("incompatible %s! (2)\n", path); return -2; } ptr_gsapi_new_instance = (GSAPI_NEW_INSTANCE)GetProcAddress (gsdll, "gsapi_new_instance"); @@ -370,10 +380,10 @@ int load_ghostscript (void) !ptr_gsapi_run_string_begin || !ptr_gsapi_run_string_continue || !ptr_gsapi_run_string_end || !ptr_gsapi_init_with_args) { unload_ghostscript (); - write_log("incompatible gsdll32.dll! (3)\n"); + write_log("incompatible %s! (3)\n", path); return -3; } - write_log ("gsdll32.dll: %s rev %d initialized\n", r.product, r.revision); + write_log ("%s: %s rev %d initialized\n", path, r.product, r.revision); return 1; } diff --git a/od-win32/win32.c b/od-win32/win32.c index a564afb3..c735b8fa 100755 --- a/od-win32/win32.c +++ b/od-win32/win32.c @@ -2350,7 +2350,7 @@ static void getstartpaths(int start_data) } extern void test (void); -extern int screenshotmode, b0rken_ati_overlay; +extern int screenshotmode, b0rken_ati_overlay,postscript_print_debugging; static int PASCAL WinMain2 (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) @@ -2407,6 +2407,7 @@ static int PASCAL WinMain2 (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR if (!strcmp (arg, "-nomultidisplay")) multi_display = 0; if (!strcmp (arg, "-legacypaths")) start_data = -1; if (!strcmp (arg, "-screenshotbmp")) screenshotmode = 0; + if (!strcmp (arg, "-psprintdebug")) postscript_print_debugging = 1; if (!strcmp (arg, "-datapath") && i + 1 < argc) { strcpy(start_path_data, argv[i + 1]); start_data = 1; diff --git a/od-win32/win32.h b/od-win32/win32.h index 36d51b09..c9732662 100755 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -21,8 +21,8 @@ extern int manual_painting_needed; extern int manual_palette_refresh_needed; extern int mouseactive, focus; extern int ignore_messages_all; -#define WINUAEBETA 1 -#define WINUAEBETASTR " Beta 2" +#define WINUAEBETA 0 +#define WINUAEBETASTR "" extern char start_path_exe[MAX_DPATH]; extern char start_path_data[MAX_DPATH];