summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2004-09-22 23:45:13 +0000
committerIan C <ianc@noddybox.co.uk>2004-09-22 23:45:13 +0000
commiteadcbfa85ed30c5534f5b3646b27b37d2e6eae4d (patch)
tree48e33c8467de7bc8d9021191627684ff7bd473d9 /src/main.c
parent0922b7993ce1d18de8fe975b17fd33cd3841ae9c (diff)
Updates
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/main.c b/src/main.c
index 507243e..93a7dc1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -71,8 +71,8 @@ static void Usage(void)
*/
int main(int argc, char *argv[])
{
- char tape_in[FILENAME_MAX];
- char tape_out[FILENAME_MAX];
+ char tape_in[FILENAME_MAX]="";
+ char tape_out[FILENAME_MAX]="";
Z80 *z80;
SDL_Event *e;
int quit;
@@ -84,9 +84,6 @@ int main(int argc, char *argv[])
trace=IConfig(CONF_TRACE);
- strcpy(tape_in,SConfig(CONF_TAPEDIR));
- strcpy(tape_out,SConfig(CONF_TAPEDIR));
-
z80=Z80Init(SPECWriteMem,
SPECReadMem,
SPECWriteWord,
@@ -265,22 +262,36 @@ int main(int argc, char *argv[])
case SDLK_F8:
if (e->key.state==SDL_PRESSED)
{
+ GFXKeyRepeat(TRUE);
+
if (GUIFileSelect("TAPE TO LOAD",TRUE,
- tape_in,tape_in))
+ tape_in[0] ?
+ Dirname(tape_in) :
+ SConfig(CONF_TAPEDIR),
+ tape_in))
{
SPECMount(SPEC_TAPE_IN,tape_in);
}
+
+ GFXKeyRepeat(FALSE);
}
break;
case SDLK_F9:
if (e->key.state==SDL_PRESSED)
{
+ GFXKeyRepeat(TRUE);
+
if (GUIFileSelect("TAPE TO SAVE",FALSE,
- tape_out,tape_out))
+ tape_out[0] ?
+ Dirname(tape_out) :
+ SConfig(CONF_TAPEDIR),
+ tape_out))
{
SPECMount(SPEC_TAPE_OUT,tape_out);
}
+
+ GFXKeyRepeat(FALSE);
}
break;