Mercurial > repos > blastem
annotate saves.h @ 1588:348814d5b73f
Fix double free in sync to video mode
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 20 Jun 2018 09:43:28 -0700 |
parents | da1dce39e846 |
children | 319d90025d50 |
rev | line source |
---|---|
1478
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 #ifndef SAVES_H_ |
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
2 #define SAVES_H_ |
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
3 |
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
4 #include <time.h> |
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
5 #include <stdint.h> |
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
6 #include "system.h" |
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
7 |
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 #define QUICK_SAVE_SLOT 10 |
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
9 |
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
10 typedef struct { |
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
11 char *desc; |
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
12 time_t modification_time; |
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
13 } save_slot_info; |
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
14 |
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
15 char *get_slot_name(system_header *system, uint32_t slot_index, char *ext); |
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
16 save_slot_info *get_slot_info(system_header *system, uint32_t *num_out); |
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
17 void free_slot_info(save_slot_info *slots); |
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
18 |
da1dce39e846
Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
19 #endif //SAVES_H_ |