mirror of
https://github.com/trudnai/Steve2.git
synced 2024-12-21 14:30:09 +00:00
Fixed WOZ file save
This commit is contained in:
parent
34bd53d9be
commit
5374c8f035
@ -114,6 +114,14 @@
|
|||||||
<ContextState
|
<ContextState
|
||||||
contextName = "addr_ind_Y:Apple2_mmio.h">
|
contextName = "addr_ind_Y:Apple2_mmio.h">
|
||||||
</ContextState>
|
</ContextState>
|
||||||
|
<ContextState
|
||||||
|
contextName = "closure #1 in AppDelegate.saveFile(_:):AppDelegate.swift">
|
||||||
|
<PersistentStrings>
|
||||||
|
<PersistentString
|
||||||
|
value = "savePanel.url?.absoluteString">
|
||||||
|
</PersistentString>
|
||||||
|
</PersistentStrings>
|
||||||
|
</ContextState>
|
||||||
<ContextState
|
<ContextState
|
||||||
contextName = "set_flags_NZCV:common.h">
|
contextName = "set_flags_NZCV:common.h">
|
||||||
<PersistentStrings>
|
<PersistentStrings>
|
||||||
|
@ -53,7 +53,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|||||||
let savePanel = NSSavePanel()
|
let savePanel = NSSavePanel()
|
||||||
savePanel.begin { (result) in
|
savePanel.begin { (result) in
|
||||||
if result.rawValue == NSApplication.ModalResponse.OK.rawValue {
|
if result.rawValue == NSApplication.ModalResponse.OK.rawValue {
|
||||||
woz_saveFile( savePanel.url?.absoluteString );
|
woz_saveFile( savePanel.url?.path );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -554,7 +554,7 @@ int woz_saveFile( const char * filename ) {
|
|||||||
return WOZ_ERR_FILE_NOT_FOUND;
|
return WOZ_ERR_FILE_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
fwrite( &woz_file_buffer, woz_file_size, 1, f );
|
fwrite( woz_file_buffer, woz_file_size, 1, f );
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
return WOZ_ERR_OK;
|
return WOZ_ERR_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user