[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx:[654] vendor/fuse-emulator/current
Brought to you by:
fredm
From: <fr...@us...> - 2010-10-18 10:33:16
|
Revision: 654 http://fuse-for-macosx.svn.sourceforge.net/fuse-for-macosx/?rev=654&view=rev Author: fredm Date: 2010-10-18 10:33:08 +0000 (Mon, 18 Oct 2010) Log Message: ----------- Load . into vendor/fuse-emulator/current. Modified Paths: -------------- vendor/fuse-emulator/current/fuse/configure.in vendor/fuse-emulator/current/fuse/disk/beta.c vendor/fuse-emulator/current/fuse/disk/disk.c vendor/fuse-emulator/current/fuse/disk/disk.h vendor/fuse-emulator/current/fuse/disk/opus.c vendor/fuse-emulator/current/fuse/disk/plusd.c vendor/fuse-emulator/current/fuse/hacking/ChangeLog vendor/fuse-emulator/current/fuse/if1.c vendor/fuse-emulator/current/fuse/machines/specplus3.c vendor/fuse-emulator/current/fuse/man/fuse.1 vendor/fuse-emulator/current/fuse/menu.c vendor/fuse-emulator/current/fuse/menu_data.dat vendor/fuse-emulator/current/fuse/ui/gtk/gtkdisplay.c vendor/fuse-emulator/current/fuse/ui/ui.h vendor/fuse-emulator/current/fuse/ui/widget/query.c vendor/fuse-emulator/current/fuse/ui.c vendor/fuse-emulator/current/libspectrum/configure.in vendor/fuse-emulator/current/libspectrum/hacking/ChangeLog Modified: vendor/fuse-emulator/current/fuse/configure.in =================================================================== --- vendor/fuse-emulator/current/fuse/configure.in 2010-10-16 09:47:07 UTC (rev 653) +++ vendor/fuse-emulator/current/fuse/configure.in 2010-10-18 10:33:08 UTC (rev 654) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -dnl $Id: configure.in 4175 2010-10-06 10:44:19Z fredm $ +dnl $Id: configure.in 4181 2010-10-10 10:28:09Z fredm $ dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -42,7 +42,11 @@ AC_SUBST(WINDRES) if test "$WINDRES" != no; then WINDRES_OBJ="windres.o" - AC_DEFINE([VERSION_WIN32], [translit(FUSE_VERSION, [.], [,])], [Define version information for win32 executable]) + define(FUSE_FULL_VERSION, + [ifelse(translit(FUSE_VERSION, [0-9]), [.], [FUSE_VERSION[.0.0]], + translit(FUSE_VERSION, [0-9]), [..], [FUSE_VERSION[.0]], + [FUSE_VERSION])])dnl + AC_DEFINE([VERSION_WIN32], [translit(FUSE_FULL_VERSION, [.], [,])], [Define version information for win32 executable]) fi AC_SUBST(WINDRES_OBJ) AM_SUBST_NOTMAKE(WINDRES_OBJ) Modified: vendor/fuse-emulator/current/fuse/disk/beta.c =================================================================== --- vendor/fuse-emulator/current/fuse/disk/beta.c 2010-10-16 09:47:07 UTC (rev 653) +++ vendor/fuse-emulator/current/fuse/disk/beta.c 2010-10-18 10:33:08 UTC (rev 654) @@ -1,7 +1,7 @@ /* beta.c: Routines for handling the Beta disk interface Copyright (c) 2004-2008 Stuart Brady - $Id: beta.c 4147 2010-08-19 12:25:15Z fredm $ + $Id: beta.c 4180 2010-10-09 12:59:37Z fredm $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -564,25 +564,28 @@ } int -beta_disk_eject( beta_drive_number which, int write ) +beta_disk_eject( beta_drive_number which, int saveas ) { wd_fdc_drive *d; char drive; - + if( which >= BETA_NUM_DRIVES ) return 1; - + d = &beta_drives[ which ]; - + if( !d->fdd.loaded ) return 0; - - if( write ) { - - if( ui_beta_disk_write( which ) ) return 1; + if( saveas ) { /* 1 -> save as.., 2 -> save */ + + if( d->disk.filename == NULL ) saveas = 1; + if( ui_beta_disk_write( which, 2 - saveas ) ) return 1; + d->disk.dirty = 0; + return 0; + } else { - + if( d->disk.dirty ) { ui_confirm_save_t confirm; @@ -603,7 +606,7 @@ switch( confirm ) { case UI_CONFIRM_SAVE_SAVE: - if( ui_beta_disk_write( which ) ) return 1; + if( beta_disk_eject( which, 2 ) ) return 1; /* first save */ break; case UI_CONFIRM_SAVE_DONTSAVE: break; @@ -641,6 +644,7 @@ int error; d->disk.type = DISK_TYPE_NONE; + if( filename == NULL ) filename = d->disk.filename; /* write over original file */ error = disk_write( &d->disk, filename ); if( error != DISK_OK ) { @@ -649,6 +653,10 @@ return 1; } + if( d->disk.filename && strcmp( filename, d->disk.filename ) ) { + free( d->disk.filename ); + d->disk.filename = strdup( filename ); + } return 0; } Modified: vendor/fuse-emulator/current/fuse/disk/disk.c =================================================================== --- vendor/fuse-emulator/current/fuse/disk/disk.c 2010-10-16 09:47:07 UTC (rev 653) +++ vendor/fuse-emulator/current/fuse/disk/disk.c 2010-10-18 10:33:08 UTC (rev 654) @@ -1,7 +1,7 @@ /* disk.c: Routines for handling disk images Copyright (c) 2007-2010 Gergely Szasz - $Id: disk.c 4141 2010-07-19 11:30:21Z fredm $ + $Id: disk.c 4180 2010-10-09 12:59:37Z fredm $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -675,6 +675,10 @@ free( d->data ); d->data = NULL; } + if( d->filename != NULL ) { + free( d->filename ); + d->filename = NULL; + } d->type = DISK_TYPE_NONE; } @@ -728,6 +732,7 @@ disk_new( disk_t *d, int sides, int cylinders, disk_dens_t density, disk_type_t type ) { + d->filename = NULL; if( density < DISK_DENS_AUTO || density > DISK_HD || /* unknown density */ type <= DISK_TYPE_NONE || type >= DISK_TYPE_LAST || /* unknown type */ sides < 1 || sides > 2 || /* 1 or 2 side */ @@ -1903,6 +1908,7 @@ d->dirty = 0; disk_update_tlens( d ); update_tracks_mode( d ); + d->filename = strdup( filename ); return d->status = DISK_OK; } @@ -1972,6 +1978,7 @@ int l, g = 0, pos = 0; disk_t d1, d2; + d->filename = NULL; if( filename == NULL || *filename == '\0' ) return d->status = DISK_OPEN; Modified: vendor/fuse-emulator/current/fuse/disk/disk.h =================================================================== --- vendor/fuse-emulator/current/fuse/disk/disk.h 2010-10-16 09:47:07 UTC (rev 653) +++ vendor/fuse-emulator/current/fuse/disk/disk.h 2010-10-18 10:33:08 UTC (rev 654) @@ -1,7 +1,7 @@ /* fdd.h: Header for handling raw disk images Copyright (c) 2007-2010 Gergely Szasz - $Id: disk.h 4114 2010-01-15 13:45:51Z fredm $ + $Id: disk.h 4180 2010-10-09 12:59:37Z fredm $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -87,6 +87,7 @@ } disk_dens_t; typedef struct disk_t { + char *filename; /* original filename */ int sides; /* 1 or 2 */ int cylinders; /* tracks per side */ int bpt; /* bytes per track */ Modified: vendor/fuse-emulator/current/fuse/disk/opus.c =================================================================== --- vendor/fuse-emulator/current/fuse/disk/opus.c 2010-10-16 09:47:07 UTC (rev 653) +++ vendor/fuse-emulator/current/fuse/disk/opus.c 2010-10-18 10:33:08 UTC (rev 654) @@ -410,7 +410,7 @@ } int -opus_disk_eject( opus_drive_number which, int write ) +opus_disk_eject( opus_drive_number which, int saveas ) { wd_fdc_drive *d; @@ -422,9 +422,12 @@ if( d->disk.type == DISK_TYPE_NONE ) return 0; - if( write ) { + if( saveas ) { /* 1 -> save as.., 2 -> save */ - if( ui_opus_disk_write( which ) ) return 1; + if( d->disk.filename == NULL ) saveas = 1; + if( ui_opus_disk_write( which, 2 - saveas ) ) return 1; + d->disk.dirty = 0; + return 0; } else { @@ -439,7 +442,7 @@ switch( confirm ) { case UI_CONFIRM_SAVE_SAVE: - if( ui_opus_disk_write( which ) ) return 1; + if( opus_disk_eject( which, 2 ) ) return 1; /* first save */ break; case UI_CONFIRM_SAVE_DONTSAVE: break; @@ -529,6 +532,7 @@ int error; d->disk.type = DISK_TYPE_NONE; + if( filename == NULL ) filename = d->disk.filename; /* write over original file */ error = disk_write( &d->disk, filename ); if( error != DISK_OK ) { @@ -537,6 +541,10 @@ return 1; } + if( d->disk.filename && strcmp( filename, d->disk.filename ) ) { + free( d->disk.filename ); + d->disk.filename = strdup( filename ); + } return 0; } Modified: vendor/fuse-emulator/current/fuse/disk/plusd.c =================================================================== --- vendor/fuse-emulator/current/fuse/disk/plusd.c 2010-10-16 09:47:07 UTC (rev 653) +++ vendor/fuse-emulator/current/fuse/disk/plusd.c 2010-10-18 10:33:08 UTC (rev 654) @@ -2,7 +2,7 @@ Copyright (c) 1999-2007 Stuart Brady, Fredrick Meunier, Philip Kendall, Dmitry Sanarin, Darren Salt - $Id: plusd.c 4131 2010-05-19 10:52:37Z fredm $ + $Id: plusd.c 4180 2010-10-09 12:59:37Z fredm $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -457,7 +457,7 @@ } int -plusd_disk_eject( plusd_drive_number which, int write ) +plusd_disk_eject( plusd_drive_number which, int saveas ) { wd_fdc_drive *d; @@ -469,9 +469,12 @@ if( d->disk.type == DISK_TYPE_NONE ) return 0; - if( write ) { + if( saveas ) { /* 1 -> save as.., 2 -> save */ - if( ui_plusd_disk_write( which ) ) return 1; + if( d->disk.filename == NULL ) saveas = 1; + if( ui_plusd_disk_write( which, 2 - saveas ) ) return 1; + d->disk.dirty = 0; + return 0; } else { @@ -486,7 +489,7 @@ switch( confirm ) { case UI_CONFIRM_SAVE_SAVE: - if( ui_plusd_disk_write( which ) ) return 1; + if( plusd_disk_eject( which, 2 ) ) return 1; /* first save */ break; case UI_CONFIRM_SAVE_DONTSAVE: break; @@ -569,13 +572,15 @@ return 0; } +/***TODO most part of the next routine could be move to a common place... */ int plusd_disk_write( plusd_drive_number which, const char *filename ) { wd_fdc_drive *d = &plusd_drives[ which ]; int error; - + d->disk.type = DISK_TYPE_NONE; + if( filename == NULL ) filename = d->disk.filename; /* write over original file */ error = disk_write( &d->disk, filename ); if( error != DISK_OK ) { @@ -583,6 +588,10 @@ disk_strerror( error ) ); return 1; } + if( d->disk.filename && strcmp( filename, d->disk.filename ) ) { + free( d->disk.filename ); + d->disk.filename = strdup( filename ); + } return 0; } Modified: vendor/fuse-emulator/current/fuse/hacking/ChangeLog =================================================================== --- vendor/fuse-emulator/current/fuse/hacking/ChangeLog 2010-10-16 09:47:07 UTC (rev 653) +++ vendor/fuse-emulator/current/fuse/hacking/ChangeLog 2010-10-18 10:33:08 UTC (rev 654) @@ -3345,9 +3345,19 @@ 20101003 README: small update to mention WoS forums. 20101006 configure.in: update header check for XShm.h (patch #3081497) (Gergely Szasz). -20101006 ui/gtk/{gtkkeyboard.c,gtkui.c,statusbar.c,stock.c}: use F1 as shortcut to - open menus, set window dialogs as transient for the main window and set a - fixed width for the emulation speed display (patch #3081729) (Sergio - Baldovi). -20101007 ui.c: don't close a disk or mdr if a write fails (patch #3058156) (thanks, - Crisis) (Gergely Szasz). +20101006 ui/gtk/{gtkkeyboard.c,gtkui.c,statusbar.c,stock.c}: use F1 as shortcut + to open menus, set window dialogs as transient for the main window and + set a fixed width for the emulation speed display (patch #3081729) + (Sergio Baldovi). +20101007 ui.c: don't close a disk or mdr if a write fails (patch #3058156) + (thanks, Crisis) (Gergely Szasz). +20101007 ui/widget/query.c: fix colour of dialog Cancel entry and correct action + returned when cancel is selected (patch #3083619) (Gergely Szasz). +20101009 disk/{beta.c,disk.[ch],opus.c,plusd.c},if1.c,machines/specplus3.c, + man/fuse.1,menu.c,menu_data.dat,ui.c,ui/ui.h: change "Eject and write" + menu items to "Save" and "Save as" (patch #3083639) (Gergely Szasz). +20101010 configure.in: pad version number for Win32 if needed (patch #3084574) + (Sergio Baldovi). +20101011 ui/gtk/gtkdisplay.c: resize window when machine selection switches + between Timex and non-Timex modes (fixes bug #3084862) (thanks, Phil) + (Fred). Modified: vendor/fuse-emulator/current/fuse/if1.c =================================================================== --- vendor/fuse-emulator/current/fuse/if1.c 2010-10-16 09:47:07 UTC (rev 653) +++ vendor/fuse-emulator/current/fuse/if1.c 2010-10-18 10:33:08 UTC (rev 654) @@ -1,7 +1,7 @@ /* if1.c: Interface I handling routines Copyright (c) 2004-2008 Gergely Szasz, Philip Kendall - $Id: if1.c 4099 2009-10-22 10:59:02Z fredm $ + $Id: if1.c 4180 2010-10-09 12:59:37Z fredm $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -64,6 +64,7 @@ typedef struct microdrive_t { utils_file file; + char *filename; /* old filename */ int inserted; int modified; int motor_on; @@ -1052,6 +1053,7 @@ libspectrum_byte len; long int i; + mdr->filename = NULL; if( settings_current.mdr_random_len ) { /* Random length */ len = 171 + ( ( rand() >> 2 ) + ( rand() >> 2 ) + ( rand() >> 2 ) + ( rand() >> 2 ) ) @@ -1135,6 +1137,7 @@ mdr->inserted = 1; mdr->modified = 0; + mdr->filename = strdup( filename ); /* we assume formatted cartridges */ for( i = libspectrum_microdrive_cartridge_len( mdr->cartridge ); i > 0; i-- ) @@ -1146,7 +1149,7 @@ } int -if1_mdr_eject( int which, int write ) +if1_mdr_eject( int which, int saveas ) { microdrive_t *mdr; @@ -1158,9 +1161,12 @@ if( !mdr->inserted ) return 0; - if( write ) { + if( saveas ) { /* 1 -> save as.., 2 -> save */ - if( ui_mdr_write( which ) ) return 1; + if( mdr->filename == NULL ) saveas = 1; + if( ui_mdr_write( which, 2 - saveas ) ) return 1; + mdr->modified = 0; + return 0; } else { @@ -1175,7 +1181,7 @@ switch( confirm ) { case UI_CONFIRM_SAVE_SAVE: - if( ui_mdr_write( which ) ) return 1; + if( if1_mdr_eject( which, 2 ) ) return 1; /* first save */ break; case UI_CONFIRM_SAVE_DONTSAVE: break; @@ -1186,7 +1192,11 @@ } mdr->inserted = 0; - + if( mdr->filename != NULL ) { + free( mdr->filename ); + mdr->filename = NULL; + } + update_menu( UMENU_MDRV1 + which ); return 0; } @@ -1198,10 +1208,16 @@ libspectrum_microdrive_mdr_write( mdr->cartridge, &mdr->file.buffer, &mdr->file.length ); - + + if( filename == NULL ) filename = mdr->filename; /* Write over the original file */ + if( utils_write_file( filename, mdr->file.buffer, mdr->file.length ) ) return 1; + if( mdr->filename && strcmp( filename, mdr->filename ) ) { + free( mdr->filename ); + mdr->filename = strdup( filename ); + } return 0; } Modified: vendor/fuse-emulator/current/fuse/machines/specplus3.c =================================================================== --- vendor/fuse-emulator/current/fuse/machines/specplus3.c 2010-10-16 09:47:07 UTC (rev 653) +++ vendor/fuse-emulator/current/fuse/machines/specplus3.c 2010-10-18 10:33:08 UTC (rev 654) @@ -1,7 +1,7 @@ /* specplus3.c: Spectrum +2A/+3 specific routines Copyright (c) 1999-2007 Philip Kendall, Darren Salt - $Id: specplus3.c 4131 2010-05-19 10:52:37Z fredm $ + $Id: specplus3.c 4180 2010-10-09 12:59:37Z fredm $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -452,7 +452,7 @@ break; } error = disk_new( &d->disk, dt->heads, dt->cylinders, DISK_DENS_AUTO, DISK_UDI ); - disk_preformat( &d->disk ); /* pre-format disk for +3 */ + disk_preformat( &d->disk ); /* pre-format disk for +3 */ if( error != DISK_OK ) { ui_error( UI_ERROR_ERROR, "Failed to create disk image: %s", disk_strerror( error ) ); @@ -488,7 +488,7 @@ } int -specplus3_disk_eject( specplus3_drive_number which, int write ) +specplus3_disk_eject( specplus3_drive_number which, int saveas ) { upd_fdc_drive *d; @@ -500,9 +500,12 @@ if( d->disk.type == DISK_TYPE_NONE ) return 0; - if( write ) { + if( saveas ) { /* 1 -> save as.., 2 -> save */ - if( ui_plus3_disk_write( which ) ) return 1; + if( d->disk.filename == NULL ) saveas = 1; + if( ui_plus3_disk_write( which, 2 - saveas ) ) return 1; /* save as... */ + d->disk.dirty = 0; + return 0; } else { @@ -517,7 +520,7 @@ switch( confirm ) { case UI_CONFIRM_SAVE_SAVE: - if( ui_plus3_disk_write( which ) ) return 1; + if( specplus3_disk_eject( which, 2 ) ) return 1; /* first save it...*/ break; case UI_CONFIRM_SAVE_DONTSAVE: break; @@ -605,8 +608,9 @@ { upd_fdc_drive *d = &specplus3_drives[ which ]; int error; - + d->disk.type = DISK_TYPE_NONE; + if( filename == NULL ) filename = d->disk.filename; /* write over original file */ error = disk_write( &d->disk, filename ); if( error != DISK_OK ) { @@ -615,6 +619,10 @@ return 1; } + if( d->disk.filename && strcmp( filename, d->disk.filename ) ) { + free( d->disk.filename ); + d->disk.filename = strdup( filename ); + } return 0; } Modified: vendor/fuse-emulator/current/fuse/man/fuse.1 =================================================================== --- vendor/fuse-emulator/current/fuse/man/fuse.1 2010-10-16 09:47:07 UTC (rev 653) +++ vendor/fuse-emulator/current/fuse/man/fuse.1 2010-10-18 10:33:08 UTC (rev 654) @@ -2327,8 +2327,7 @@ active from the .I "Options, Peripherals" menu. Note that any changes to the Microdrive image will not be -written to the file on disk until the appropriate `eject and write' -option is used. +written to the file on disk until the appropriate save option is used. .RE .PP .I "Media, Interface I, Microdrive 1, Insert New" @@ -2349,12 +2348,17 @@ modified, you will be asked as to whether you want any changes saved. .RE .PP -.I "Media, Interface I, Microdrive 1, Eject and write..." +.I "Media, Interface I, Microdrive 1, Save" .RS -Write the Microdrive image in Microdrive 1 to a file, and then eject -the image. You will be prompted for a filename. +Save the Microdrive image in Microdrive 1. .RE .PP +.I "Media, Interface I, Microdrive 1, Save as..." +.RS +Write the Microdrive image in Microdrive 1 to a file. You will be +prompted for a filename. +.RE +.PP .I "Media, Interface I, Microdrive 1, Write protect, Enable" .RS Enable the write protect tab for the image in Microdrive 1. @@ -2415,23 +2419,28 @@ .PP .I "Media, Disk, +3, Drive A:, Insert..." .RS -Select a disk-image file to read/write in the +3's emulated drive +Insert a disk-image file to read/write in the +3's emulated drive A:. .RE .PP .I "Media, Disk, +3, Drive A:, Eject" .RS -Deselect the disk image currently in the +3's emulated drive A: \- or +Eject the disk image currently in the +3's emulated drive A: \- or from the emulated machine's perspective, eject it. Note that any changes made to the image will not be saved. .RE .PP -.I "Media, Disk, +3, Drive A:, Eject and write..." +.I "Media, Disk, +3, Drive A:, Save" .RS -Deselect the disk image currently in the +3's drive A: and write the -current state of the disk to a file. You will be prompted for a filename. +Save the disk image currently in the +3's drive A:. .RE .PP +.I "Media, Disk, +3, Drive A:, Save as..." +.RS +Save the current state of the disk image currently in the +3's +drive A: to a file. You will be prompted for a filename. +.RE +.PP .I "Media, Disk, +3, Drive B:, Insert..." .RS As above, but for the +3's drive B:. Fuse emulates drive B: as a @@ -2443,11 +2452,16 @@ As above, but for drive B:. .RE .PP -.I "Media, Disk, +3, Drive B:, Eject and write" +.I "Media, Disk, +3, Drive B:, Save" .RS As above, but for drive B:. .RE .PP +.I "Media, Disk, +3, Drive B:, Save as..." +.RS +As above, but for drive B:. +.RE +.PP .I "Media, Disk, Beta, Drive A:, Insert New" .RS Insert a new (unformatted) disk into the emulated Beta drive A:. @@ -2457,7 +2471,9 @@ .br .I "Media, Disk, Beta, Drive A:, Eject" .br -.I "Media, Disk, Beta, Drive A:, Eject and write..." +.I "Media, Disk, Beta, Drive A:, Save" +.br +.I "Media, Disk, Beta, Drive A:, Save as..." .RS As above, but for the emulated Beta disk drive A:. .RE @@ -2487,8 +2503,10 @@ .br .I "Media, Disk, Opus, Drive 1, Eject" .br -.I "Media, Disk, Opus, Drive 1, Eject and write..." +.I "Media, Disk, Opus, Drive 1, Save" .br +.I "Media, Disk, Opus, Drive 1, Save as..." +.br .I "Media, Disk, Opus, Drive 1, Write protect, Enable" .br .I "Media, Disk, Opus, Drive 1, Write protect, Disable" @@ -2504,8 +2522,10 @@ .br .I "Media, Disk, +D, Drive 1, Eject" .br -.I "Media, Disk, +D, Drive 1, Eject and write..." +.I "Media, Disk, +D, Drive 1, Save" .br +.I "Media, Disk, +D, Drive 1, Save as..." +.br .I "Media, Disk, +D, Drive 1, Write protect, Enable" .br .I "Media, Disk, +D, Drive 1, Write protect, Disable" Modified: vendor/fuse-emulator/current/fuse/menu.c =================================================================== --- vendor/fuse-emulator/current/fuse/menu.c 2010-10-16 09:47:07 UTC (rev 653) +++ vendor/fuse-emulator/current/fuse/menu.c 2010-10-18 10:33:08 UTC (rev 654) @@ -1,7 +1,7 @@ /* menu.c: general menu callbacks Copyright (c) 2004-2005 Philip Kendall - $Id: menu.c 4159 2010-09-13 11:51:13Z fredm $ + $Id: menu.c 4180 2010-10-09 12:59:37Z fredm $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -435,32 +435,39 @@ fuse_emulation_unpause(); } +/* +1. menu_media_eject +2. xxx_disk_eject +2.a. ui_xxx_disk_write( save ) +2.b. ui_xxx_disk_write( saveas ) +[2.c. ui_xxx_disk_eject( save )] +*/ MENU_CALLBACK_WITH_ACTION( menu_media_eject ) { - int which, write, type; + int which, saveas, type; ui_widget_finish(); action--; which = action & 0x00f; type = ( action & 0x0f0 ) >> 4; - write = !!( action & 0x100 ); + saveas = ( action & 0xf00 ) >> 8; /* 0 -> eject, 1 -> save as, 2 -> save */ switch( type ) { case 0: - specplus3_disk_eject( which, write ); + specplus3_disk_eject( which, saveas ); break; case 1: - beta_disk_eject( which, write ); + beta_disk_eject( which, saveas ); break; case 2: - plusd_disk_eject( which, write ); + plusd_disk_eject( which, saveas ); break; case 3: - if1_mdr_eject( which, write ); + if1_mdr_eject( which, saveas ); break; case 4: - opus_disk_eject( which, write ); + opus_disk_eject( which, saveas ); break; } } Modified: vendor/fuse-emulator/current/fuse/menu_data.dat =================================================================== --- vendor/fuse-emulator/current/fuse/menu_data.dat 2010-10-16 09:47:07 UTC (rev 653) +++ vendor/fuse-emulator/current/fuse/menu_data.dat 2010-10-18 10:33:08 UTC (rev 654) @@ -1,7 +1,7 @@ # menu_data.dat: Menu structure for Fuse # Copyright (c) 2004 Philip Kendall -# $Id: menu_data.dat 4101 2009-11-13 12:54:28Z fredm $ +# $Id: menu_data.dat 4180 2010-10-09 12:59:37Z fredm $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -143,7 +143,8 @@ Media/Interface I/Microdrive 1/Insert _New, Item,, menu_media_insert_new,, 0x31 Media/Interface I/Microdrive 1/_Insert..., Item,, menu_media_insert,, 0x31 Media/Interface I/Microdrive 1/_Eject, Item,, menu_media_eject,, 0x031 -Media/Interface I/Microdrive 1/Eject and _write..., Item,, menu_media_eject,, 0x131 +Media/Interface I/Microdrive 1/_Save, Item,, menu_media_eject,, 0x231 +Media/Interface I/Microdrive 1/Save _As..., Item,, menu_media_eject,, 0x131 Media/Interface I/Microdrive 1/Write _protect, Branch Media/Interface I/Microdrive 1/Write protect/_Enable, Item,, menu_media_writeprotect,, 0x131 Media/Interface I/Microdrive 1/Write protect/_Disable, Item,, menu_media_writeprotect,, 0x031 @@ -152,7 +153,8 @@ Media/Interface I/Microdrive 2/Insert _New, Item,, menu_media_insert_new,, 0x32 Media/Interface I/Microdrive 2/_Insert..., Item,, menu_media_insert,, 0x32 Media/Interface I/Microdrive 2/_Eject, Item,, menu_media_eject,, 0x032 -Media/Interface I/Microdrive 2/Eject and _write..., Item,, menu_media_eject,, 0x132 +Media/Interface I/Microdrive 2/_Save, Item,, menu_media_eject,, 0x232 +Media/Interface I/Microdrive 2/Save _As..., Item,, menu_media_eject,, 0x132 Media/Interface I/Microdrive 2/Write _protect, Branch Media/Interface I/Microdrive 2/Write protect/_Enable, Item,, menu_media_writeprotect,, 0x132 Media/Interface I/Microdrive 2/Write protect/_Disable, Item,, menu_media_writeprotect,, 0x032 @@ -161,7 +163,8 @@ Media/Interface I/Microdrive 3/Insert _New, Item,, menu_media_insert_new,, 0x33 Media/Interface I/Microdrive 3/_Insert..., Item,, menu_media_insert,, 0x33 Media/Interface I/Microdrive 3/_Eject, Item,, menu_media_eject,, 0x033 -Media/Interface I/Microdrive 3/Eject and _write..., Item,, menu_media_eject,, 0x133 +Media/Interface I/Microdrive 3/_Save, Item,, menu_media_eject,, 0x233 +Media/Interface I/Microdrive 3/Save _As..., Item,, menu_media_eject,, 0x133 Media/Interface I/Microdrive 3/Write _protect, Branch Media/Interface I/Microdrive 3/Write protect/_Enable, Item,, menu_media_writeprotect,, 0x133 Media/Interface I/Microdrive 3/Write protect/_Disable, Item,, menu_media_writeprotect,, 0x033 @@ -170,7 +173,8 @@ Media/Interface I/Microdrive 4/Insert _New, Item,, menu_media_insert_new,, 0x34 Media/Interface I/Microdrive 4/_Insert..., Item,, menu_media_insert,, 0x34 Media/Interface I/Microdrive 4/_Eject, Item,, menu_media_eject,, 0x034 -Media/Interface I/Microdrive 4/Eject and _write..., Item,, menu_media_eject,, 0x134 +Media/Interface I/Microdrive 4/_Save, Item,, menu_media_eject,, 0x234 +Media/Interface I/Microdrive 4/Save _As..., Item,, menu_media_eject,, 0x134 Media/Interface I/Microdrive 4/Write _protect, Branch Media/Interface I/Microdrive 4/Write protect/_Enable, Item,, menu_media_writeprotect,, 0x134 Media/Interface I/Microdrive 4/Write protect/_Disable, Item,, menu_media_writeprotect,, 0x034 @@ -179,7 +183,8 @@ Media/Interface I/Microdrive 5/Insert _New, Item,, menu_media_insert_new,, 0x35 Media/Interface I/Microdrive 5/_Insert..., Item,, menu_media_insert,, 0x35 Media/Interface I/Microdrive 5/_Eject, Item,, menu_media_eject,, 0x035 -Media/Interface I/Microdrive 5/Eject and _write..., Item,, menu_media_eject,, 0x135 +Media/Interface I/Microdrive 5/_Save, Item,, menu_media_eject,, 0x235 +Media/Interface I/Microdrive 5/Save _As..., Item,, menu_media_eject,, 0x135 Media/Interface I/Microdrive 5/Write _protect, Branch Media/Interface I/Microdrive 5/Write protect/_Enable, Item,, menu_media_writeprotect,, 0x135 Media/Interface I/Microdrive 5/Write protect/_Disable, Item,, menu_media_writeprotect,, 0x035 @@ -188,7 +193,8 @@ Media/Interface I/Microdrive 6/Insert _New, Item,, menu_media_insert_new,, 0x36 Media/Interface I/Microdrive 6/_Insert..., Item,, menu_media_insert,, 0x36 Media/Interface I/Microdrive 6/_Eject, Item,, menu_media_eject,, 0x036 -Media/Interface I/Microdrive 6/Eject and _write..., Item,, menu_media_eject,, 0x136 +Media/Interface I/Microdrive 6/_Save, Item,, menu_media_eject,, 0x236 +Media/Interface I/Microdrive 6/Save _As..., Item,, menu_media_eject,, 0x136 Media/Interface I/Microdrive 6/Write _protect, Branch Media/Interface I/Microdrive 6/Write protect/_Enable, Item,, menu_media_writeprotect,, 0x136 Media/Interface I/Microdrive 6/Write protect/_Disable, Item,, menu_media_writeprotect,, 0x036 @@ -197,7 +203,8 @@ Media/Interface I/Microdrive 7/Insert _New, Item,, menu_media_insert_new,, 0x37 Media/Interface I/Microdrive 7/_Insert..., Item,, menu_media_insert,, 0x37 Media/Interface I/Microdrive 7/_Eject, Item,, menu_media_eject,, 0x037 -Media/Interface I/Microdrive 7/Eject and _write..., Item,, menu_media_eject,, 0x137 +Media/Interface I/Microdrive 7/_Save, Item,, menu_media_eject,, 0x237 +Media/Interface I/Microdrive 7/Save _As..., Item,, menu_media_eject,, 0x137 Media/Interface I/Microdrive 7/Write _protect, Branch Media/Interface I/Microdrive 7/Write protect/_Enable, Item,, menu_media_writeprotect,, 0x137 Media/Interface I/Microdrive 7/Write protect/_Disable, Item,, menu_media_writeprotect,, 0x037 @@ -206,7 +213,8 @@ Media/Interface I/Microdrive 8/Insert _New, Item,, menu_media_insert_new,, 0x38 Media/Interface I/Microdrive 8/_Insert..., Item,, menu_media_insert,, 0x38 Media/Interface I/Microdrive 8/_Eject, Item,, menu_media_eject,, 0x038 -Media/Interface I/Microdrive 8/Eject and _write..., Item,, menu_media_eject,, 0x138 +Media/Interface I/Microdrive 8/_Save, Item,, menu_media_eject,, 0x238 +Media/Interface I/Microdrive 8/Save _As..., Item,, menu_media_eject,, 0x138 Media/Interface I/Microdrive 8/Write _protect, Branch Media/Interface I/Microdrive 8/Write protect/_Enable, Item,, menu_media_writeprotect,, 0x138 Media/Interface I/Microdrive 8/Write protect/_Disable, Item,, menu_media_writeprotect,, 0x038 @@ -230,7 +238,8 @@ Media/Disk/+3/Drive A:/Insert _New, Item,, menu_media_insert_new,, 0x01 Media/Disk/+3/Drive A:/_Insert..., Item,, menu_media_insert,, 0x01 Media/Disk/+3/Drive A:/_Eject, Item,, menu_media_eject,, 0x01 -Media/Disk/+3/Drive A:/Eject and _write..., Item,, menu_media_eject,, 0x101 +Media/Disk/+3/Drive A:/_Save, Item,, menu_media_eject,, 0x201 +Media/Disk/+3/Drive A:/Save _As..., Item,, menu_media_eject,, 0x101 Media/Disk/+3/Drive A:/_Flip disk, Branch Media/Disk/+3/Drive A:/Flip disk/Turn _upside down, Item,, menu_media_flip,, 0x101 Media/Disk/+3/Drive A:/Flip disk/Turn _back, Item,, menu_media_flip,, 0x001 @@ -241,7 +250,8 @@ Media/Disk/+3/Drive B:/Insert _New, Item,, menu_media_insert_new,, 0x02 Media/Disk/+3/Drive B:/_Insert..., Item,, menu_media_insert,, 0x02 Media/Disk/+3/Drive B:/_Eject, Item,, menu_media_eject,, 0x02 -Media/Disk/+3/Drive B:/Eject and _write..., Item,, menu_media_eject,, 0x102 +Media/Disk/+3/Drive B:/_Save, Item,, menu_media_eject,, 0x202 +Media/Disk/+3/Drive B:/Save _As..., Item,, menu_media_eject,, 0x102 Media/Disk/+3/Drive B:/_Flip disk, Branch Media/Disk/+3/Drive B:/Flip disk/Turn _upside down, Item,, menu_media_flip,, 0x102 Media/Disk/+3/Drive B:/Flip disk/Turn _back, Item,, menu_media_flip,, 0x002 @@ -254,7 +264,8 @@ Media/Disk/Beta/Drive A:/Insert _New, Item,, menu_media_insert_new,, 0x11 Media/Disk/Beta/Drive A:/_Insert..., Item,, menu_media_insert,, 0x11 Media/Disk/Beta/Drive A:/_Eject, Item,, menu_media_eject,, 0x11 -Media/Disk/Beta/Drive A:/Eject and _write..., Item,, menu_media_eject,, 0x111 +Media/Disk/Beta/Drive A:/_Save, Item,, menu_media_eject,, 0x211 +Media/Disk/Beta/Drive A:/Save _As..., Item,, menu_media_eject,, 0x111 Media/Disk/Beta/Drive A:/_Flip disk, Branch Media/Disk/Beta/Drive A:/Flip disk/Turn _upside down, Item,, menu_media_flip,, 0x111 Media/Disk/Beta/Drive A:/Flip disk/Turn _back, Item,, menu_media_flip,, 0x011 @@ -265,7 +276,8 @@ Media/Disk/Beta/Drive B:/Insert _New, Item,, menu_media_insert_new,, 0x12 Media/Disk/Beta/Drive B:/_Insert..., Item,, menu_media_insert,, 0x12 Media/Disk/Beta/Drive B:/_Eject, Item,, menu_media_eject,, 0x012 -Media/Disk/Beta/Drive B:/Eject and _write..., Item,, menu_media_eject,, 0x112 +Media/Disk/Beta/Drive B:/_Save, Item,, menu_media_eject,, 0x212 +Media/Disk/Beta/Drive B:/Save _As..., Item,, menu_media_eject,, 0x112 Media/Disk/Beta/Drive B:/_Flip disk, Branch Media/Disk/Beta/Drive B:/Flip disk/Turn _upside down, Item,, menu_media_flip,, 0x112 Media/Disk/Beta/Drive B:/Flip disk/Turn _back, Item,, menu_media_flip,, 0x012 @@ -276,7 +288,8 @@ Media/Disk/Beta/Drive C:/Insert _New, Item,, menu_media_insert_new,, 0x13 Media/Disk/Beta/Drive C:/_Insert..., Item,, menu_media_insert,, 0x13 Media/Disk/Beta/Drive C:/_Eject, Item,, menu_media_eject,, 0x013 -Media/Disk/Beta/Drive C:/Eject and _write..., Item,, menu_media_eject,, 0x113 +Media/Disk/Beta/Drive C:/_Save, Item,, menu_media_eject,, 0x213 +Media/Disk/Beta/Drive C:/Save _As..., Item,, menu_media_eject,, 0x113 Media/Disk/Beta/Drive C:/_Flip disk, Branch Media/Disk/Beta/Drive C:/Flip disk/Turn _upside down, Item,, menu_media_flip,, 0x113 Media/Disk/Beta/Drive C:/Flip disk/Turn _back, Item,, menu_media_flip,, 0x013 @@ -287,7 +300,8 @@ Media/Disk/Beta/Drive D:/Insert _New, Item,, menu_media_insert_new,, 0x14 Media/Disk/Beta/Drive D:/_Insert..., Item,, menu_media_insert,, 0x14 Media/Disk/Beta/Drive D:/_Eject, Item,, menu_media_eject,, 0x014 -Media/Disk/Beta/Drive D:/Eject and _write..., Item,, menu_media_eject,, 0x114 +Media/Disk/Beta/Drive D:/_Save, Item,, menu_media_eject,, 0x214 +Media/Disk/Beta/Drive D:/Save _As..., Item,, menu_media_eject,, 0x114 Media/Disk/Beta/Drive D:/_Flip disk, Branch Media/Disk/Beta/Drive D:/Flip disk/Turn _upside down, Item,, menu_media_flip,, 0x114 Media/Disk/Beta/Drive D:/Flip disk/Turn _back, Item,, menu_media_flip,, 0x014 @@ -300,7 +314,8 @@ Media/Disk/+D/Drive 1/Insert _New, Item,, menu_media_insert_new,, 0x21 Media/Disk/+D/Drive 1/_Insert..., Item,, menu_media_insert,, 0x21 Media/Disk/+D/Drive 1/_Eject, Item,, menu_media_eject,, 0x021 -Media/Disk/+D/Drive 1/Eject and _write..., Item,, menu_media_eject,, 0x121 +Media/Disk/+D/Drive 1/_Save, Item,, menu_media_eject,, 0x221 +Media/Disk/+D/Drive 1/Save _As..., Item,, menu_media_eject,, 0x121 Media/Disk/+D/Drive 1/_Flip disk, Branch Media/Disk/+D/Drive 1/Flip disk/Turn _upside down, Item,, menu_media_flip,, 0x121 Media/Disk/+D/Drive 1/Flip disk/Turn _back, Item,, menu_media_flip,, 0x021 @@ -311,7 +326,8 @@ Media/Disk/+D/Drive 2/Insert _New, Item,, menu_media_insert_new,, 0x22 Media/Disk/+D/Drive 2/_Insert..., Item,, menu_media_insert,, 0x22 Media/Disk/+D/Drive 2/_Eject, Item,, menu_media_eject,, 0x022 -Media/Disk/+D/Drive 2/Eject and _write..., Item,, menu_media_eject,, 0x122 +Media/Disk/+D/Drive 2/_Save, Item,, menu_media_eject,, 0x222 +Media/Disk/+D/Drive 2/Save _As..., Item,, menu_media_eject,, 0x122 Media/Disk/+D/Drive 2/_Flip disk, Branch Media/Disk/+D/Drive 2/Flip disk/Turn _upside down, Item,, menu_media_flip,, 0x122 Media/Disk/+D/Drive 2/Flip disk/Turn _back, Item,, menu_media_flip,, 0x022 @@ -324,7 +340,8 @@ Media/Disk/Opus/Drive 1/Insert _New, Item,, menu_media_insert_new,, 0x41 Media/Disk/Opus/Drive 1/_Insert..., Item,, menu_media_insert,, 0x41 Media/Disk/Opus/Drive 1/_Eject, Item,, menu_media_eject,, 0x041 -Media/Disk/Opus/Drive 1/Eject and _write..., Item,, menu_media_eject,, 0x141 +Media/Disk/Opus/Drive 1/_Save, Item,, menu_media_eject,, 0x241 +Media/Disk/Opus/Drive 1/Save _As..., Item,, menu_media_eject,, 0x141 Media/Disk/Opus/Drive 1/_Flip disk, Branch Media/Disk/Opus/Drive 1/Flip disk/Turn _upside down, Item,, menu_media_flip,, 0x141 Media/Disk/Opus/Drive 1/Flip disk/Turn _back, Item,, menu_media_flip,, 0x041 @@ -335,7 +352,8 @@ Media/Disk/Opus/Drive 2/Insert _New, Item,, menu_media_insert_new,, 0x42 Media/Disk/Opus/Drive 2/_Insert..., Item,, menu_media_insert,, 0x42 Media/Disk/Opus/Drive 2/_Eject, Item,, menu_media_eject,, 0x042 -Media/Disk/Opus/Drive 2/Eject and _write..., Item,, menu_media_eject,, 0x142 +Media/Disk/Opus/Drive 2/_Save, Item,, menu_media_eject,, 0x242 +Media/Disk/Opus/Drive 2/Save _As..., Item,, menu_media_eject,, 0x142 Media/Disk/Opus/Drive 2/_Flip disk, Branch Media/Disk/Opus/Drive 2/Flip disk/Turn _upside down, Item,, menu_media_flip,, 0x142 Media/Disk/Opus/Drive 2/Flip disk/Turn _back, Item,, menu_media_flip,, 0x042 Modified: vendor/fuse-emulator/current/fuse/ui/gtk/gtkdisplay.c =================================================================== --- vendor/fuse-emulator/current/fuse/ui/gtk/gtkdisplay.c 2010-10-16 09:47:07 UTC (rev 653) +++ vendor/fuse-emulator/current/fuse/ui/gtk/gtkdisplay.c 2010-10-18 10:33:08 UTC (rev 654) @@ -1,7 +1,7 @@ /* gtkdisplay.c: GTK+ routines for dealing with the Speccy screen Copyright (c) 2000-2005 Philip Kendall - $Id: gtkdisplay.c 4139 2010-06-27 13:18:07Z pak21 $ + $Id: gtkdisplay.c 4182 2010-10-11 12:24:13Z fredm $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -97,6 +97,7 @@ static int init_colours( void ); static void gtkdisplay_area(int x, int y, int width, int height); static void register_scalers( int force_scaler ); +static void gtkdisplay_load_gfx_mode( void ); /* Callbacks */ @@ -168,6 +169,8 @@ if ( scaler_select_scaler( current_scaler ) ) scaler_select_scaler( SCALER_NORMAL ); + gtkdisplay_load_gfx_mode(); + display_ui_initialised = 1; return 0; @@ -231,9 +234,13 @@ if( force_scaler ) { switch( gtkdisplay_current_size ) { - case 1: scaler = SCALER_NORMAL; break; - case 2: scaler = SCALER_DOUBLESIZE; break; - case 3: scaler = SCALER_TRIPLESIZE; break; + case 1: scaler = machine_current->timex ? SCALER_HALF : SCALER_NORMAL; + break; + case 2: scaler = machine_current->timex ? SCALER_NORMAL : SCALER_DOUBLESIZE; + break; + case 3: scaler = machine_current->timex ? SCALER_TIMEX1_5X : + SCALER_TRIPLESIZE; + break; } } @@ -299,55 +306,11 @@ int uidisplay_hotswap_gfx_mode( void ) { - GdkGeometry geometry; - GdkWindowHints hints; - float scale; - fuse_emulation_pause(); - scale = scaler_get_scaling_factor( current_scaler ); + /* Setup the new GFX mode */ + gtkdisplay_load_gfx_mode(); - hints = GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE | - GDK_HINT_BASE_SIZE | GDK_HINT_RESIZE_INC; - - geometry.min_width = DISPLAY_ASPECT_WIDTH; - geometry.min_height = DISPLAY_SCREEN_HEIGHT; - geometry.max_width = 3 * DISPLAY_ASPECT_WIDTH; - geometry.max_height = 3 * DISPLAY_SCREEN_HEIGHT; - geometry.base_width = scale * image_width; - geometry.base_height = scale * image_height; - geometry.width_inc = DISPLAY_ASPECT_WIDTH; - geometry.height_inc = DISPLAY_SCREEN_HEIGHT; - - if( settings_current.aspect_hint ) { - hints |= GDK_HINT_ASPECT; - if( settings_current.strict_aspect_hint ) { - geometry.min_aspect = geometry.max_aspect = - (float)DISPLAY_ASPECT_WIDTH / DISPLAY_SCREEN_HEIGHT; - } else { - geometry.min_aspect = 1.2; - geometry.max_aspect = 1.5; - } - } - - gtk_window_set_geometry_hints( GTK_WINDOW( gtkui_window ), - GTK_WIDGET( gtkui_drawing_area ), - &geometry, hints ); - - gtk_window_set_default_size( GTK_WINDOW( gtkui_window ), - scale * image_width, scale * image_height ); - - gtk_drawing_area_size( GTK_DRAWING_AREA( gtkui_drawing_area ), - scale * image_width, scale * image_height ); - - drawing_area_resize( scale * image_width, scale * image_height, 0 ); - - gtk_window_resize( GTK_WINDOW( gtkui_window ), scale * image_width, - scale * image_height ); - - /* Redraw the entire screen... */ - display_refresh_all(); - fuse_emulation_unpause(); return 0; @@ -465,3 +428,54 @@ drawing_area_resize( event->configure.width, event->configure.height, 1 ); return TRUE; } + +static void +gtkdisplay_load_gfx_mode( void ) +{ + GdkGeometry geometry; + GdkWindowHints hints; + float scale; + + scale = scaler_get_scaling_factor( current_scaler ); + + hints = GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE | + GDK_HINT_BASE_SIZE | GDK_HINT_RESIZE_INC; + + geometry.min_width = DISPLAY_ASPECT_WIDTH; + geometry.min_height = DISPLAY_SCREEN_HEIGHT; + geometry.max_width = 3 * DISPLAY_ASPECT_WIDTH; + geometry.max_height = 3 * DISPLAY_SCREEN_HEIGHT; + geometry.base_width = scale * image_width; + geometry.base_height = scale * image_height; + geometry.width_inc = DISPLAY_ASPECT_WIDTH; + geometry.height_inc = DISPLAY_SCREEN_HEIGHT; + + if( settings_current.aspect_hint ) { + hints |= GDK_HINT_ASPECT; + if( settings_current.strict_aspect_hint ) { + geometry.min_aspect = geometry.max_aspect = + (float)DISPLAY_ASPECT_WIDTH / DISPLAY_SCREEN_HEIGHT; + } else { + geometry.min_aspect = 1.2; + geometry.max_aspect = 1.5; + } + } + + gtk_window_set_geometry_hints( GTK_WINDOW( gtkui_window ), + GTK_WIDGET( gtkui_drawing_area ), + &geometry, hints ); + + gtk_window_set_default_size( GTK_WINDOW( gtkui_window ), + scale * image_width, scale * image_height ); + + gtk_drawing_area_size( GTK_DRAWING_AREA( gtkui_drawing_area ), + scale * image_width, scale * image_height ); + + drawing_area_resize( scale * image_width, scale * image_height, 0 ); + + gtk_window_resize( GTK_WINDOW( gtkui_window ), scale * image_width, + scale * image_height ); + + /* Redraw the entire screen... */ + display_refresh_all(); +} Modified: vendor/fuse-emulator/current/fuse/ui/ui.h =================================================================== --- vendor/fuse-emulator/current/fuse/ui/ui.h 2010-10-16 09:47:07 UTC (rev 653) +++ vendor/fuse-emulator/current/fuse/ui/ui.h 2010-10-18 10:33:08 UTC (rev 654) @@ -1,7 +1,7 @@ /* ui.h: General UI event handling routines Copyright (c) 2000-2004 Philip Kendall - $Id: ui.h 4128 2010-05-18 11:20:47Z fredm $ + $Id: ui.h 4180 2010-10-09 12:59:37Z fredm $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -115,11 +115,11 @@ int ui_tape_write( void ); /* Write a +3, Beta or +D disk out */ -int ui_plus3_disk_write( specplus3_drive_number which ); -int ui_beta_disk_write( beta_drive_number which ); -int ui_opus_disk_write( opus_drive_number which ); -int ui_plusd_disk_write( plusd_drive_number which ); -int ui_mdr_write( int which ); +int ui_plus3_disk_write( specplus3_drive_number which, int saveas ); +int ui_beta_disk_write( beta_drive_number which, int saveas ); +int ui_opus_disk_write( opus_drive_number which, int saveas ); +int ui_plusd_disk_write( plusd_drive_number which, int saveas ); +int ui_mdr_write( int which, int saveas ); /* Get a rollback point from the given list */ int ui_get_rollback_point( GSList *points ); Modified: vendor/fuse-emulator/current/fuse/ui/widget/query.c =================================================================== --- vendor/fuse-emulator/current/fuse/ui/widget/query.c 2010-10-16 09:47:07 UTC (rev 653) +++ vendor/fuse-emulator/current/fuse/ui/widget/query.c 2010-10-18 10:33:08 UTC (rev 654) @@ -1,7 +1,7 @@ /* query.c: The query widgets Copyright (c) 2004-2008 Darren Salt, Fredrick Meunier - $Id: query.c 4103 2009-11-21 10:16:36Z fredm $ + $Id: query.c 4179 2010-10-08 10:05:55Z fredm $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -62,7 +62,7 @@ static widget_query_entry query_save[] = { { "\012S\001ave", 0, INPUT_KEY_s, widget_save_click }, { "\012D\001on't save", 1, INPUT_KEY_d, widget_dont_save_click }, - { "\010C\001ancel", 2, INPUT_KEY_c, widget_cancel_click }, + { "\012C\001ancel", 2, INPUT_KEY_c, widget_cancel_click }, { NULL } }; @@ -87,7 +87,7 @@ static void widget_cancel_click( void ) { - widget_query.save = UI_CONFIRM_SAVE_DONTSAVE; + widget_query.save = UI_CONFIRM_SAVE_CANCEL; } static void Modified: vendor/fuse-emulator/current/fuse/ui.c =================================================================== --- vendor/fuse-emulator/current/fuse/ui.c 2010-10-16 09:47:07 UTC (rev 653) +++ vendor/fuse-emulator/current/fuse/ui.c 2010-10-18 10:33:08 UTC (rev 654) @@ -1,7 +1,7 @@ /* ui.c: User interface routines, but those which are independent of any UI Copyright (c) 2002 Philip Kendall - $Id: ui.c 4177 2010-10-07 09:34:31Z fredm $ + $Id: ui.c 4180 2010-10-09 12:59:37Z fredm $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -238,7 +238,8 @@ { UI_MENU_ITEM_MEDIA_IF1_M1_EJECT, "/Media/Interface I/Microdrive 1/Eject", - "/Media/Interface I/Microdrive 1/Eject and write...", 0, + "/Media/Interface I/Microdrive 1/Save As...", 0, + "/Media/Interface I/Microdrive 1/Save", 0, "/Media/Interface I/Microdrive 1/Write protect", 0 }, { UI_MENU_ITEM_MEDIA_IF1_M1_WP_SET, @@ -247,7 +248,8 @@ { UI_MENU_ITEM_MEDIA_IF1_M2_EJECT, "/Media/Interface I/Microdrive 2/Eject", - "/Media/Interface I/Microdrive 2/Eject and write...", 0, + "/Media/Interface I/Microdrive 2/Save As...", 0, + "/Media/Interface I/Microdrive 2/Save", 0, "/Media/Interface I/Microdrive 2/Write protect", 0 }, { UI_MENU_ITEM_MEDIA_IF1_M2_WP_SET, @@ -256,7 +258,8 @@ { UI_MENU_ITEM_MEDIA_IF1_M3_EJECT, "/Media/Interface I/Microdrive 3/Eject", - "/Media/Interface I/Microdrive 3/Eject and write...", 0, + "/Media/Interface I/Microdrive 3/Save As...", 0, + "/Media/Interface I/Microdrive 3/Save", 0, "/Media/Interface I/Microdrive 3/Write protect", 0 }, { UI_MENU_ITEM_MEDIA_IF1_M3_WP_SET, @@ -265,7 +268,8 @@ { UI_MENU_ITEM_MEDIA_IF1_M4_EJECT, "/Media/Interface I/Microdrive 4/Eject", - "/Media/Interface I/Microdrive 4/Eject and write...", 0, + "/Media/Interface I/Microdrive 4/Save As...", 0, + "/Media/Interface I/Microdrive 4/Save", 0, "/Media/Interface I/Microdrive 4/Write protect", 0 }, { UI_MENU_ITEM_MEDIA_IF1_M4_WP_SET, @@ -274,7 +278,8 @@ { UI_MENU_ITEM_MEDIA_IF1_M5_EJECT, "/Media/Interface I/Microdrive 5/Eject", - "/Media/Interface I/Microdrive 5/Eject and write...", 0, + "/Media/Interface I/Microdrive 5/Save As...", 0, + "/Media/Interface I/Microdrive 5/Save", 0, "/Media/Interface I/Microdrive 5/Write protect", 0 }, { UI_MENU_ITEM_MEDIA_IF1_M5_WP_SET, @@ -283,7 +288,8 @@ { UI_MENU_ITEM_MEDIA_IF1_M6_EJECT, "/Media/Interface I/Microdrive 6/Eject", - "/Media/Interface I/Microdrive 6/Eject and write...", 0, + "/Media/Interface I/Microdrive 6/Save As...", 0, + "/Media/Interface I/Microdrive 6/Save", 0, "/Media/Interface I/Microdrive 6/Write protect", 0 }, { UI_MENU_ITEM_MEDIA_IF1_M6_WP_SET, @@ -292,7 +298,8 @@ { UI_MENU_ITEM_MEDIA_IF1_M7_EJECT, "/Media/Interface I/Microdrive 7/Eject", - "/Media/Interface I/Microdrive 7/Eject and write...", 0, + "/Media/Interface I/Microdrive 7/Save As...", 0, + "/Media/Interface I/Microdrive 7/Save", 0, "/Media/Interface I/Microdrive 7/Write protect", 0 }, { UI_MENU_ITEM_MEDIA_IF1_M7_WP_SET, @@ -301,7 +308,8 @@ { UI_MENU_ITEM_MEDIA_IF1_M8_EJECT, "/Media/Interface I/Microdrive 8/Eject", - "/Media/Interface I/Microdrive 8/Eject and write...", 0, + "/Media/Interface I/Microdrive 8/Save As...", 0, + "/Media/Interface I/Microdrive 8/Save", 0, "/Media/Interface I/Microdrive 8/Write protect", 0 }, { UI_MENU_ITEM_MEDIA_IF1_M8_WP_SET, @@ -328,7 +336,8 @@ { UI_MENU_ITEM_MEDIA_DISK_PLUS3_A_EJECT, "/Media/Disk/+3/Drive A:/Eject", - "/Media/Disk/+3/Drive A:/Eject and write...", 0, + "/Media/Disk/+3/Drive A:/Save As...", 0, + "/Media/Disk/+3/Drive A:/Save", 0, "/Media/Disk/+3/Drive A:/Flip disk", 0, "/Media/Disk/+3/Drive A:/Write protect", 0 }, @@ -344,7 +353,8 @@ { UI_MENU_ITEM_MEDIA_DISK_PLUS3_B_EJECT, "/Media/Disk/+3/Drive B:/Eject", - "/Media/Disk/+3/Drive B:/Eject and write...", 0, + "/Media/Disk/+3/Drive B:/Save As...", 0, + "/Media/Disk/+3/Drive B:/Save", 0, "/Media/Disk/+3/Drive B:/Flip disk", 0, "/Media/Disk/+3/Drive B:/Write protect", 0 }, @@ -362,7 +372,8 @@ { UI_MENU_ITEM_MEDIA_DISK_BETA_A_EJECT, "/Media/Disk/Beta/Drive A:/Eject", - "/Media/Disk/Beta/Drive A:/Eject and write...", 0, + "/Media/Disk/Beta/Drive A:/Save As...", 0, + "/Media/Disk/Beta/Drive A:/Save", 0, "/Media/Disk/Beta/Drive A:/Flip disk", 0, "/Media/Disk/Beta/Drive A:/Write protect", 0 }, @@ -378,7 +389,8 @@ { UI_MENU_ITEM_MEDIA_DISK_BETA_B_EJECT, "/Media/Disk/Beta/Drive B:/Eject", - "/Media/Disk/Beta/Drive B:/Eject and write...", 0, + "/Media/Disk/Beta/Drive B:/Save As...", 0, + "/Media/Disk/Beta/Drive B:/Save", 0, "/Media/Disk/Beta/Drive B:/Flip disk", 0, "/Media/Disk/Beta/Drive B:/Write protect", 0 }, @@ -394,7 +406,8 @@ { UI_MENU_ITEM_MEDIA_DISK_BETA_C_EJECT, "/Media/Disk/Beta/Drive C:/Eject", - "/Media/Disk/Beta/Drive C:/Eject and write...", 0, + "/Media/Disk/Beta/Drive C:/Save As...", 0, + "/Media/Disk/Beta/Drive C:/Save", 0, "/Media/Disk/Beta/Drive C:/Flip disk", 0, "/Media/Disk/Beta/Drive C:/Write protect", 0 }, @@ -410,7 +423,8 @@ { UI_MENU_ITEM_MEDIA_DISK_BETA_D_EJECT, "/Media/Disk/Beta/Drive D:/Eject", - "/Media/Disk/Beta/Drive D:/Eject and write...", 0, + "/Media/Disk/Beta/Drive D:/Save As...", 0, + "/Media/Disk/Beta/Drive D:/Save", 0, "/Media/Disk/Beta/Drive D:/Flip disk", 0, "/Media/Disk/Beta/Drive D:/Write protect", 0 }, @@ -428,7 +442,8 @@ { UI_MENU_ITEM_MEDIA_DISK_PLUSD_1_EJECT, "/Media/Disk/+D/Drive 1/Eject", - "/Media/Disk/+D/Drive 1/Eject and write...", 0, + "/Media/Disk/+D/Drive 1/Save As...", 0, + "/Media/Disk/+D/Drive 1/Save", 0, "/Media/Disk/+D/Drive 1/Flip disk", 0, "/Media/Disk/+D/Drive 1/Write protect", 0 }, @@ -444,7 +459,8 @@ { UI_MENU_ITEM_MEDIA_DISK_PLUSD_2_EJECT, "/Media/Disk/+D/Drive 2/Eject", - "/Media/Disk/+D/Drive 2/Eject and write...", 0, + "/Media/Disk/+D/Drive 2/Save As...", 0, + "/Media/Disk/+D/Drive 2/Save", 0, "/Media/Disk/+D/Drive 2/Flip disk", 0, "/Media/Disk/+D/Drive 2/Write protect", 0 }, @@ -462,7 +478,8 @@ { UI_MENU_ITEM_MEDIA_DISK_OPUS_1_EJECT, "/Media/Disk/Opus/Drive 1/Eject", - "/Media/Disk/Opus/Drive 1/Eject and write...", 0, + "/Media/Disk/Opus/Drive 1/Save As...", 0, + "/Media/Disk/Opus/Drive 1/Save", 0, "/Media/Disk/Opus/Drive 1/Flip disk", 0, "/Media/Disk/Opus/Drive 1/Write protect", 0 }, @@ -478,7 +495,8 @@ { UI_MENU_ITEM_MEDIA_DISK_OPUS_2_EJECT, "/Media/Disk/Opus/Drive 2/Eject", - "/Media/Disk/Opus/Drive 2/Eject and write...", 0, + "/Media/Disk/Opus/Drive 2/Save As...", 0, + "/Media/Disk/Opus/Drive 2/Save", 0, "/Media/Disk/Opus/Drive 2/Flip disk", 0, "/Media/Disk/Opus/Drive 2/Write protect", 0 }, @@ -641,10 +659,10 @@ } int -ui_plus3_disk_write( specplus3_drive_number which ) +ui_plus3_disk_write( specplus3_drive_number which, int saveas ) { int err; - char drive, *filename, title[80]; + char drive, *filename = NULL, title[80]; switch( which ) { case SPECPLUS3_DRIVE_A: drive = 'A'; break; @@ -656,12 +674,13 @@ snprintf( title, 80, "Fuse - Write +3 Disk %c:", drive ); - filename = ui_get_save_filename( title ); - if( !filename ) { fuse_emulation_unpause(); return 1; } - + if( saveas ) { + filename = ui_get_save_filename( title ); + if( !filename ) { fuse_emulation_unpause(); return 1; } + } err = specplus3_disk_write( which, filename ); - free( filename ); + if( saveas ) free( filename ); fuse_emulation_unpause(); @@ -669,10 +688,10 @@ } int -ui_beta_disk_write( beta_drive_number which ) +ui_beta_disk_write( beta_drive_number which, int saveas ) { int err; - char drive, *filename, title[80]; + char drive, *filename = NULL, title[80]; switch( which ) { case BETA_DRIVE_A: drive = 'A'; break; @@ -686,12 +705,14 @@ snprintf( title, 80, "Fuse - Write Beta Disk %c:", drive ); - filename = ui_get_save_filename( title ); - if( !filename ) { fuse_emulation_unpause(); return 1; } + if( saveas ) { + filename = ui_get_save_filename( title ); + if( !filename ) { fuse_emulation_unpause(); return 1; } + } err = beta_disk_write( which, filename ); - free( filename ); + if( saveas ) free( filename ); fuse_emulation_unpause(); @@ -699,10 +720,10 @@ } int -ui_opus_disk_write( opus_drive_number which ) +ui_opus_disk_write( opus_drive_number which, int saveas ) { int err; - char drive, *filename, title[80]; + char drive, *filename = NULL, title[80]; switch( which ) { case OPUS_DRIVE_1: drive = '1'; break; @@ -714,12 +735,14 @@ snprintf( title, 80, "Fuse - Write Opus Disk %c", drive ); - filename = ui_get_save_filename( title ); - if( !filename ) { fuse_emulation_unpause(); return 1; } + if( saveas ) { + filename = ui_get_save_filename( title ); + if( !filename ) { fuse_emulation_unpause(); return 1; } + } err = opus_disk_write( which, filename ); - free( filename ); + if( saveas ) free( filename ); fuse_emulation_unpause(); @@ -727,10 +750,10 @@ } int -ui_plusd_disk_write( plusd_drive_number which ) +ui_plusd_disk_write( plusd_drive_number which, int saveas ) { int err; - char drive, *filename, title[80]; + char drive, *filename = NULL, title[80]; switch( which ) { case PLUSD_DRIVE_1: drive = '1'; break; @@ -742,12 +765,14 @@ snprintf( title, 80, "Fuse - Write +D Disk %c", drive ); - filename = ui_get_save_filename( title ); - if( !filename ) { fuse_emulation_unpause(); return 1; } + if( saveas ) { + filename = ui_get_save_filename( title ); + if( !filename ) { fuse_emulation_unpause(); return 1; } + } err = plusd_disk_write( which, filename ); - free( filename ); + if( saveas ) free( filename ); fuse_emulation_unpause(); @@ -755,21 +780,23 @@ } int -ui_mdr_write( int which ) +ui_mdr_write( int which, int saveas ) { int err; - char *filename, title[80]; + char *filename = NULL, title[80]; fuse_emulation_pause(); snprintf( title, 80, "Fuse - Write Microdrive Cartridge %i", which + 1 ); - filename = ui_get_save_filename( title ); - if( !filename ) { fuse_emulation_unpause(); return 1; } + if( saveas ) { + filename = ui_get_save_filename( title ); + if( !filename ) { fuse_emulation_unpause(); return 1; } + } err = if1_mdr_write( which, filename ); - free( filename ); + if( saveas ) free( filename ); fuse_emulation_unpause(); Modified: vendor/fuse-emulator/current/libspectrum/configure.in =================================================================== --- vendor/fuse-emulator/current/libspectrum/configure.in 2010-10-16 09:47:07 UTC (rev 653) +++ vendor/fuse-emulator/current/libspectrum/configure.in 2010-10-18 10:33:08 UTC (rev 654) @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. dnl Copyright (c) 1999-2008 Philip Kendall -dnl $Id: configure.in 4167 2010-10-02 12:08:34Z pak21 $ +dnl $Id: configure.in 4181 2010-10-10 10:28:09Z fredm $ dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -59,7 +59,11 @@ if test "$WINDRES" != no; then WINDRES_OBJ="windres.o" WINDRES_LDFLAGS="-Xlinker windres.o" - AC_DEFINE([VERSION_WIN32], [translit(LIBSPECTRUM_VERSION, [.], [,])[,0]], [Define version information for win32 dll library]) + define(LIBSPECTRUM_FULL_VERSION, + [ifelse(translit(LIBSPECTRUM_VERSION, [0-9]), [.], [LIBSPECTRUM_VERSION[.0.0]], + translit(LIBSPECTRUM_VERSION, [0-9]), [..], [LIBSPECTRUM_VERSION[.0]], + [LIBSPECTRUM_VERSION])])dnl + AC_DEFINE([VERSION_WIN32], [translit(LIBSPECTRUM_FULL_VERSION, [.], [,])], [Define version information for win32 dll library]) fi AC_SUBST(WINDRES_OBJ) AM_SUBST_NOTMAKE(WINDRES_OBJ) Modified: vendor/fuse-emulator/current/libspectrum/hacking/ChangeLog =================================================================== --- vendor/fuse-emulator/current/libspectrum/hacking/ChangeLog 2010-10-16 09:47:07 UTC (rev 653) +++ vendor/fuse-emulator/current/libspectrum/hacking/ChangeLog 2010-10-18 10:33:08 UTC (rev 654) @@ -785,3 +785,5 @@ libspectrum version number so we know that new files are written without the bug. 20101003 szx.c,test/{empty.szx,test.c}: we also need to swap A' and F'. +20101010 configure.in: pad version number for Win32 if needed (patch #3084574) + (Sergio Baldovi). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |