comparison libblastem.c @ 2302:0343f0d5add0

Fix libretro build for real
author Michael Pavone <pavone@retrodev.com>
date Sun, 12 Mar 2023 20:03:35 -0700
parents f77d36a975ff
children b50fa7602e39
comparison
equal deleted inserted replaced
2301:d30ea441b92e 2302:0343f0d5add0
75 int z80_enabled = 1; 75 int z80_enabled = 1;
76 char *save_filename; 76 char *save_filename;
77 tern_node *config; 77 tern_node *config;
78 uint8_t use_native_states = 1; 78 uint8_t use_native_states = 1;
79 system_header *current_system; 79 system_header *current_system;
80 system_media media; 80 static system_media media;
81 const system_media *current_media(void)
82 {
83 return &media;
84 }
81 85
82 RETRO_API void retro_init(void) 86 RETRO_API void retro_init(void)
83 { 87 {
84 render_audio_initialized(RENDER_AUDIO_S16, 53693175 / (7 * 6 * 4), 2, 4, sizeof(int16_t)); 88 render_audio_initialized(RENDER_AUDIO_S16, 53693175 / (7 * 6 * 4), 2, 4, sizeof(int16_t));
85 } 89 }
236 media.buffer = malloc(nearest_pow2(game->size)); 240 media.buffer = malloc(nearest_pow2(game->size));
237 memcpy(media.buffer, game->data, game->size); 241 memcpy(media.buffer, game->data, game->size);
238 media.size = game->size; 242 media.size = game->size;
239 stype = detect_system_type(&media); 243 stype = detect_system_type(&media);
240 current_system = alloc_config_system(stype, &media, 0, 0); 244 current_system = alloc_config_system(stype, &media, 0, 0);
241 245
242 unsigned format = RETRO_PIXEL_FORMAT_XRGB8888; 246 unsigned format = RETRO_PIXEL_FORMAT_XRGB8888;
243 retro_environment(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &format); 247 retro_environment(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &format);
244 248
245 return current_system != NULL; 249 return current_system != NULL;
246 } 250 }
247 251
248 /* Loads a "special" kind of game. Should not be used, 252 /* Loads a "special" kind of game. Should not be used,
249 * except in extreme cases. */ 253 * except in extreme cases. */