Fixed various compilation warnings and runtime "errors"
- Fixed some typing or naming errors resulting in compilation warnings - No longer show errors for ENOENT - Adjusted some things regularly causing merge conflicts All those things are fixed in dev branch but people tend to use master as a basis for their fork (which is usually a good idea!), and those specific items have come up in the issues. So I'm exceptionally committing those fixes to master between releases.
This commit is contained in:
parent
df5b842114
commit
59c033d7d5
@ -6,6 +6,8 @@
|
||||
- All: French translation now has accents
|
||||
- New device support: LILYGO T-Deck Plus
|
||||
- New device support: Null Nano by Ampersand
|
||||
- New device support: crokpocket
|
||||
- New device support: VMU
|
||||
|
||||
|
||||
# Retro-Go 1.44 (2025-02-03)
|
||||
|
||||
@ -236,6 +236,7 @@ void rg_audio_set_sample_rate(int sampleRate)
|
||||
{
|
||||
audio.driver->set_sample_rate(sampleRate);
|
||||
audio.sampleRate = sampleRate;
|
||||
RG_LOGI("Samplerate set to %d", audio.sampleRate);
|
||||
RELEASE_DEVICE();
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ static void lcd_set_window(int left, int top, int width, int height);
|
||||
static inline uint16_t *lcd_get_buffer(size_t length);
|
||||
static inline void lcd_send_buffer(uint16_t *buffer, size_t length);
|
||||
|
||||
#if RG_SCREEN_DRIVER == 0 /* ILI9341/ST7789 */
|
||||
#if RG_SCREEN_DRIVER == 0 || RG_SCREEN_DRIVER == 1 /* ILI9341/ST7789 */
|
||||
#include "drivers/display/ili9341.h"
|
||||
#elif RG_SCREEN_DRIVER == 99
|
||||
#include "drivers/display/sdl2.h"
|
||||
|
||||
@ -334,12 +334,17 @@ bool rg_storage_scandir(const char *path, rg_scandir_cb_t *callback, void *arg,
|
||||
|
||||
DIR *dir = opendir(path);
|
||||
if (!dir)
|
||||
{
|
||||
if (errno != ENOENT) // Only log unusual errors. Path not found isn't unusual.
|
||||
RG_LOGE("Opendir failed (%d): '%s'", errno, path);
|
||||
return false;
|
||||
}
|
||||
|
||||
// We allocate on heap in case we go recursive through rg_storage_delete
|
||||
rg_scandir_t *result = calloc(1, sizeof(rg_scandir_t));
|
||||
if (!result)
|
||||
{
|
||||
RG_LOGE("Memory allocation failed: '%s'", path);
|
||||
closedir(dir);
|
||||
return false;
|
||||
}
|
||||
@ -433,7 +438,8 @@ bool rg_storage_read_file(const char *path, void **data_out, size_t *data_len, u
|
||||
FILE *fp = fopen(path, "rb");
|
||||
if (!fp)
|
||||
{
|
||||
RG_LOGE("Fopen failed (%d): '%s'", errno, path);
|
||||
if (errno != ENOENT) // Only log unusual errors. Path not found isn't unusual.
|
||||
RG_LOGE("Fopen failed (%d): '%s'", errno, path);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -551,7 +557,8 @@ bool rg_storage_unzip_file(const char *zip_path, const char *filter, void **data
|
||||
FILE *fp = fopen(zip_path, "rb");
|
||||
if (!fp)
|
||||
{
|
||||
RG_LOGE("Fopen failed (%d): '%s'", errno, zip_path);
|
||||
if (errno != ENOENT) // Only log unusual errors. Path not found isn't unusual.
|
||||
RG_LOGE("Fopen failed (%d): '%s'", errno, zip_path);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -314,6 +314,7 @@ rg_surface_t *rg_surface_load_image_file(const char *filename, uint32_t flags)
|
||||
return img;
|
||||
}
|
||||
|
||||
// RG_LOGE("Image loading failed: '%s'", filename);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
#include "rg_localization.h"
|
||||
|
||||
static const char *language_names[RG_LANG_MAX] = {"English", "Francais"};
|
||||
static const char *language_names[RG_LANG_MAX] = {
|
||||
[RG_LANG_EN] = "English",
|
||||
[RG_LANG_FR] = "Francais",
|
||||
};
|
||||
|
||||
static const char *translations[][RG_LANG_MAX] =
|
||||
{
|
||||
|
||||
@ -988,6 +988,8 @@ void gwenesis_vdp_render_config()
|
||||
#define CONV(b) ((0x3e00000 & b)>>10) | ((0xfc00 & b)>>5) | ((0x1f & b))
|
||||
#define SPACE(c) ((0xe800 & c)<<10) | ((0x7e0 & c)<<5) | ((0x1f & c))
|
||||
|
||||
/* Function unused
|
||||
|
||||
__attribute__((optimize("unroll-loops"))) static void
|
||||
blit_4to5_line(uint16_t *in, uint16_t *out) {
|
||||
|
||||
@ -1006,6 +1008,7 @@ blit_4to5_line(uint16_t *in, uint16_t *out) {
|
||||
dest_row[x_dst + 4] = CONV(b3);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
void gwenesis_vdp_render_line(int line)
|
||||
{
|
||||
|
||||
@ -631,7 +631,7 @@ void gui_load_preview(tab_t *tab)
|
||||
|
||||
if (!tab->preview && file->checksum && (show_missing_cover || errors))
|
||||
{
|
||||
RG_LOGI("No image found for '%s'\n", file->name);
|
||||
RG_LOGD("No image found for '%s'\n", file->name);
|
||||
gui_set_status(tab, NULL, errors ? "Bad cover" : "No cover");
|
||||
// gui_draw_status(tab);
|
||||
// tab->preview = gui_get_image("cover", file->app);
|
||||
|
||||
@ -76,7 +76,7 @@ static Chip opl_chip;
|
||||
|
||||
// Temporary mixing buffer used by the mixing callback.
|
||||
|
||||
static int *mix_buffer = NULL;
|
||||
static int32_t *mix_buffer = NULL;
|
||||
|
||||
// Register number that was written.
|
||||
|
||||
@ -107,7 +107,7 @@ int OPL_Init (unsigned int rate)
|
||||
current_time = 0;
|
||||
|
||||
|
||||
mix_buffer = malloc(opl_sample_rate * sizeof(uint32_t));
|
||||
mix_buffer = malloc(opl_sample_rate * sizeof(int32_t));
|
||||
|
||||
// Create the emulator structure:
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
#include "system.h"
|
||||
#include "eeprom.h"
|
||||
|
||||
CEEPROM::CEEPROM(UBYTE typ)
|
||||
CEEPROM::CEEPROM(UBYTE type)
|
||||
{
|
||||
*filename=0;
|
||||
memset(romdata, 0xff, sizeof(romdata));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user