|
15 | 15 | bool RESTART = false;
|
16 | 16 | bool LAUNCHER = false;
|
17 | 17 | bool FOLDER = false;
|
18 |
| - bool SPLASH = false; |
| 18 | + bool SPLASH = true; |
19 | 19 | bool SETTINGS = false;
|
20 | 20 |
|
21 | 21 | int8_t STEP = 0;
|
22 | 22 | int OPTION = 0;
|
23 | 23 | int PREVIOUS = 0;
|
24 | 24 | int32_t VOLUME = 0;
|
25 | 25 | int32_t BRIGHTNESS = 0;
|
26 |
| - int32_t BRIGHTNESS_COUNT = 10; |
27 |
| - int32_t BRIGHTNESS_LEVELS[10] = {10,20,30,40,50,60,70,80,90,100}; |
| 26 | + const int32_t BRIGHTNESS_COUNT = 10; |
| 27 | + const int32_t BRIGHTNESS_LEVELS[10] = {10,20,30,40,50,60,70,80,90,100}; |
28 | 28 | int8_t USER;
|
29 | 29 | int8_t SETTING;
|
30 | 30 | int8_t COLOR;
|
|
907 | 907 |
|
908 | 908 | printf("\n----- %s -----", __func__);
|
909 | 909 | if(ROMS.total != 0) {
|
910 |
| - printf("\nprevious ROMS.total:%d", ROMS.total); |
911 | 910 | while(ROMS.total--) {
|
912 | 911 | free(FILES[ROMS.total]);
|
913 | 912 | if(ROMS.total == 0){
|
914 | 913 | free(FILES);
|
915 | 914 | break;
|
916 | 915 | }
|
917 | 916 | }
|
918 |
| - printf("\ncurrent ROMS.total:%d", ROMS.total); |
919 | 917 | }
|
920 | 918 | printf("\npath:%s", path);
|
921 | 919 |
|
|
925 | 923 | sprintf(message, "unable to open %s directory", DIRECTORIES[STEP]);
|
926 | 924 | int center = ceil((320/2)-((strlen(message)*5)/2));
|
927 | 925 | draw_text(center,134,message,false,false);
|
928 |
| - printf("\nopendir(%s):failed\nERR: %d\n", path, errno); |
929 | 926 | return NULL;
|
930 | 927 | } else {
|
931 | 928 | if(directory == NULL) {
|
932 |
| - printf("\nno files found in:\t%s", path); |
933 | 929 | draw_mask(0,132,320,10);
|
934 | 930 | sprintf(message, "%s directory not found", DIRECTORIES[STEP]);
|
935 | 931 | int center = ceil((320/2)-((strlen(message)*5)/2));
|
936 | 932 | draw_text(center,134,message,false,false);
|
937 | 933 | } else {
|
938 |
| - printf("\nfiles found in:\t%s", path); |
939 | 934 | FILES = (char**)malloc(MAX_FILES * sizeof(void*));
|
940 | 935 | rewinddir(directory);
|
941 | 936 | struct dirent *file;
|
|
962 | 957 | }
|
963 | 958 | free(file);
|
964 | 959 | printf("\nnumber of files:\t%d", ROMS.total);
|
| 960 | + printf("\nfree space:0x%x (%#08x)", esp_get_free_heap_size(), heap_caps_get_free_size(MALLOC_CAP_DMA)); |
965 | 961 | }
|
966 | 962 | free(directory);
|
967 | 963 | closedir(directory);
|
|
971 | 967 | if(ROMS.offset > ROMS.total) { ROMS.offset = 0;}
|
972 | 968 | draw_mask(0,132,320,10);
|
973 | 969 | if(ROMS.total != 0) {
|
974 |
| - draw_files(); |
| 970 | + //draw_files(); |
975 | 971 | } else {
|
976 | 972 | sprintf(message, "no %s roms available", DIRECTORIES[STEP]);
|
977 | 973 | int center = ceil((320/2)-((strlen(message)*5)/2));
|
|
0 commit comments