fix missing boolimport

This commit is contained in:
Georges-Antoine Assi
2025-01-04 21:48:32 -05:00
parent f4ed587020
commit 38c6d158d0
2 changed files with 10 additions and 5 deletions
+4 -2
View File
@@ -1,12 +1,14 @@
#ifndef ROMM_ROM_H
#define ROMM_ROM_H
#include <stdbool.h>
// Structure to hold ROM information
typedef struct RomMRom {
int id;
int* igdb_id; // Nullable
void* sgdb_id; // object type
void* moby_id; // object type
int* sgdb_id; // object type
int* moby_id; // object type
int platform_id;
char* platform_slug;
char* platform_name;
+6 -3
View File
@@ -103,9 +103,12 @@ int fetch_rom_list(const char* server_url, const char* platform_slug, RomMRom**
for (int i = 0; i < *rom_count; i++) {
(*rom_list)[i].id = i + 1;
(*rom_list)[i].igdb_id = i + 10;
(*rom_list)[i].sgdb_id = i + 20;
(*rom_list)[i].moby_id = i + 30;
(*rom_list)[i].igdb_id = malloc(sizeof(int));
*(*rom_list)[i].igdb_id = i + 10;
(*rom_list)[i].sgdb_id = malloc(sizeof(int));
*(*rom_list)[i].sgdb_id = i + 20;
(*rom_list)[i].moby_id = malloc(sizeof(int));
*(*rom_list)[i].moby_id = i + 30;
(*rom_list)[i].platform_id = 1;
(*rom_list)[i].platform_slug = strdup(platform_slug);
(*rom_list)[i].platform_name = strdup("Example Platform");