Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PUAE
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
PUAE
Commits
8717434e
Commit
8717434e
authored
Jan 06, 2011
by
GnoStiC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
puae 2.3.1
parent
29e62985
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
8 deletions
+40
-8
cocoaui.m
src/gui-cocoa/cocoaui.m
+1
-1
gtkui.c
src/gui-gtk/gtkui.c
+3
-3
ami-gui.c
src/gui-muirexx/ami-gui.c
+1
-1
zfile.c
src/zfile.c
+25
-3
zfile_archive.c
src/zfile_archive.c
+10
-0
No files found.
src/gui-cocoa/cocoaui.m
View file @
8717434e
...
...
@@ -445,7 +445,7 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull
if
(
!
run_once
)
{
run_once
++
;
const
char
*
floppy_path
=
currprefs
.
path_floppy
;
const
char
*
floppy_path
=
currprefs
.
path_floppy
.
path
[
driveNumber
]
;
if
(
floppy_path
!=
NULL
)
{
char
homedir
[
MAX_PATH
];
...
...
src/gui-gtk/gtkui.c
View file @
8717434e
...
...
@@ -943,7 +943,7 @@ static void did_romchange (GtkWidget *w, gpointer data)
gtk_widget_set_sensitive
(
rom_change_widget
,
0
);
rom_selector
=
make_file_selector
(
"Select a ROM file"
,
did_rom_select
,
did_close_rom
);
filesel_set_path
(
rom_selector
,
currprefs
.
path_rom
);
filesel_set_path
(
rom_selector
,
currprefs
.
path_rom
.
path
[
0
]
);
}
static
GtkWidget
*
key_selector
;
...
...
@@ -975,7 +975,7 @@ static void did_keychange (GtkWidget *w, gpointer data)
gtk_widget_set_sensitive
(
key_change_widget
,
0
);
key_selector
=
make_file_selector
(
"Select a Kickstart key file"
,
did_key_select
,
did_close_key
);
filesel_set_path
(
key_selector
,
currprefs
.
path_rom
);
filesel_set_path
(
key_selector
,
currprefs
.
path_rom
.
path
[
0
]
);
}
static
void
add_empty_vbox
(
GtkWidget
*
tobox
)
...
...
@@ -1136,7 +1136,7 @@ static void make_floppy_disks (GtkWidget *vbox)
gtk_widget_set_sensitive
(
floppy_widget
[
i
],
0
);
floppyfileentry_set_drivename
(
FLOPPYFILEENTRY
(
floppy_widget
[
i
]),
buf
);
floppyfileentry_set_label
(
FLOPPYFILEENTRY
(
floppy_widget
[
i
]),
buf
);
floppyfileentry_set_currentdir
(
FLOPPYFILEENTRY
(
floppy_widget
[
i
]),
currprefs
.
path_floppy
);
floppyfileentry_set_currentdir
(
FLOPPYFILEENTRY
(
floppy_widget
[
i
]),
currprefs
.
path_floppy
.
path
[
i
]
);
gtk_box_pack_start
(
GTK_BOX
(
vbox
),
floppy_widget
[
i
],
FALSE
,
TRUE
,
0
);
gtk_widget_show
(
floppy_widget
[
i
]);
gtk_signal_connect
(
GTK_OBJECT
(
floppy_widget
[
i
]),
"disc-changed"
,
(
GtkSignalFunc
)
disc_changed
,
GINT_TO_POINTER
(
i
));
...
...
src/gui-muirexx/ami-gui.c
View file @
8717434e
...
...
@@ -79,7 +79,7 @@ static const char *get_last_floppy_dir (void)
atexit
(
free_last_floppy_dir
);
}
last_floppy_dir
=
my_strdup
(
currprefs
.
path_floppy
);
last_floppy_dir
=
my_strdup
(
currprefs
.
path_floppy
.
path
[
0
]
);
}
return
last_floppy_dir
;
}
...
...
src/zfile.c
View file @
8717434e
...
...
@@ -241,6 +241,17 @@ static void removeext (TCHAR *s, TCHAR *ext)
s
[
_tcslen
(
s
)
-
_tcslen
(
ext
)]
=
0
;
}
static
bool
checkwrite
(
struct
zfile
*
zf
,
int
*
retcode
)
{
if
(
zfile_needwrite
(
zf
))
{
if
(
retcode
)
*
retcode
=
-
1
;
return
true
;
}
return
false
;
}
static
uae_u8
exeheader
[]
=
{
0x00
,
0x00
,
0x03
,
0xf3
,
0x00
,
0x00
,
0x00
,
0x00
};
static
TCHAR
*
diskimages
[]
=
{
"adf"
,
"adz"
,
"ipf"
,
"fdi"
,
"dms"
,
"wrp"
,
"dsq"
,
0
};
...
...
@@ -1057,6 +1068,8 @@ static struct zfile *dms (struct zfile *z, int index, int *retcode)
int
i
;
struct
zfile
*
zextra
[
DMS_EXTRA_SIZE
]
=
{
0
};
if
(
checkwrite
(
z
,
retcode
))
return
NULL
;
if
(
recursive
)
return
NULL
;
if
(
ext
)
{
...
...
@@ -1473,6 +1486,17 @@ static struct zfile *openzip (const TCHAR *pname)
return
0
;
}
static
bool
writeneeded
(
const
TCHAR
*
mode
)
{
return
_tcschr
(
mode
,
'w'
)
||
_tcschr
(
mode
,
'a'
)
||
_tcschr
(
mode
,
'+'
)
||
_tcschr
(
mode
,
't'
);
}
bool
zfile_needwrite
(
struct
zfile
*
zf
)
{
if
(
!
zf
->
mode
)
return
false
;
return
writeneeded
(
zf
->
mode
);
}
static
struct
zfile
*
zfile_fopen_2
(
const
TCHAR
*
name
,
const
TCHAR
*
mode
,
int
mask
)
{
struct
zfile
*
l
;
...
...
@@ -1486,7 +1510,7 @@ static struct zfile *zfile_fopen_2 (const TCHAR *name, const TCHAR *mode, int ma
#endif
l
=
openzip
(
name
);
if
(
l
)
{
if
(
_tcsicmp
(
mode
,
"rb"
)
&&
_tcsicmp
(
mode
,
"r"
))
{
if
(
writeneeded
(
mode
))
{
zfile_fclose
(
l
);
return
0
;
}
...
...
@@ -1584,8 +1608,6 @@ static struct zfile *zfile_fopen_x (const TCHAR *name, const TCHAR *mode, int ma
l
=
zfile_fopen_2
(
path
,
mode
,
mask
);
if
(
!
l
)
return
0
;
if
(
_tcschr
(
mode
,
'w'
)
||
_tcschr
(
mode
,
'a'
))
return
l
;
l2
=
NULL
;
while
(
cnt
--
>
0
)
{
int
rc
;
...
...
src/zfile_archive.c
View file @
8717434e
...
...
@@ -118,6 +118,11 @@ struct zfile *archive_access_select (struct znode *parent, struct zfile *zf, uns
*
retcode
=
0
;
if
(
index
>
0
)
return
NULL
;
if
(
zfile_needwrite
(
zf
))
{
if
(
retcode
)
*
retcode
=
-
1
;
return
NULL
;
}
zv
=
getzvolume
(
parent
,
zf
,
id
);
if
(
!
zv
)
return
NULL
;
...
...
@@ -220,6 +225,11 @@ struct zfile *archive_access_select (struct znode *parent, struct zfile *zf, uns
struct
zfile
*
archive_access_arcacc_select
(
struct
zfile
*
zf
,
unsigned
int
id
,
int
*
retcode
)
{
if
(
zfile_needwrite
(
zf
))
{
if
(
retcode
)
*
retcode
=
-
1
;
return
NULL
;
}
return
zf
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment