소스 검색

Add storage to track the current image for dynamic image listing.

It would make more sense to use getName() on the current image. However, during testing this always seemed to return '\0' as the filename, even without close() being invoked. Not certain if this is a bug or something I was doing wrong. If that can be sorted out this variable can be removed to save a chunk of SRAM.
saybur 2 년 전
부모
커밋
6e9393d9d6
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/ZuluSCSI_disk.h

+ 3 - 0
src/ZuluSCSI_disk.h

@@ -32,6 +32,7 @@
 #include <scsi2sd.h>
 #include <scsiPhy.h>
 #include "ImageBackingStore.h"
+#include "ZuluSCSI_config.h"
 
 extern "C" {
 #include <disk.h>
@@ -65,6 +66,8 @@ struct image_config_t: public S2S_TargetCfg
 
     // True if there is a subdirectory of images for this target
     bool image_directory;
+    // the name of the currently mounted image in a dynamic image directory
+    char current_image[MAX_FILE_PATH] = {'\0'};
     // Index of image, for when image on-the-fly switching is used for CD drives
     uint8_t image_index = IMAGE_INDEX_MAX;