aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorneonloop2021-08-07 20:28:34 +0000
committerneonloop2021-08-07 20:28:34 +0000
commit8ad26356f5e92bd396e58290217da55858345a4e (patch)
tree8c08b9e62f36170e36514a4d1f397990e881104e /config.c
parentb148bcce05254c7ebe0ad855e5f1e958968a0bb9 (diff)
downloadpicoarch-8ad26356f5e92bd396e58290217da55858345a4e.tar.gz
picoarch-8ad26356f5e92bd396e58290217da55858345a4e.tar.bz2
picoarch-8ad26356f5e92bd396e58290217da55858345a4e.zip
Adds generic nearest and smooth scalers
Smooth is slower (10-15%) than a scaler built for a specific resolution. Works well for downscaling and for odd screen ratios until a custom scaler is built. Replaces the snes smooth scaler (outperforms it) and the gba smooth scaler (looks better)
Diffstat (limited to 'config.c')
-rw-r--r--config.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/config.c b/config.c
index ba6041c..1d3bce6 100644
--- a/config.c
+++ b/config.c
@@ -30,7 +30,7 @@ static const struct {
void config_write(FILE *f)
{
- for (int i = 0; i < array_size(config_data); i++) {
+ for (size_t i = 0; i < array_size(config_data); i++) {
switch (config_data[i].type)
{
case CE_TYPE_STR:
@@ -45,7 +45,7 @@ void config_write(FILE *f)
}
}
- for (int i = 0; i < core_options.len; i++) {
+ for (size_t i = 0; i < core_options.len; i++) {
const char* k = options_get_key(i);
if (!options_is_blocked(k))
fprintf(f, "%s = %s\n", k, options_get_value(k));
@@ -91,7 +91,7 @@ static char *config_find_value(const char* cfg, const char *key) {
void config_read(const char* cfg)
{
- for (int i = 0; i < array_size(config_data); i++) {
+ for (size_t i = 0; i < array_size(config_data); i++) {
char *tmp = config_find_value(cfg, config_data[i].name);
if (!tmp)
continue;
@@ -104,7 +104,7 @@ void config_read(const char* cfg)
parse_num_val(config_data[i].val, tmp);
}
- for (int i = 0; i < core_options.len; i++) {
+ for (size_t i = 0; i < core_options.len; i++) {
char value[256] = {0};
const char *key = options_get_key(i);
if (options_is_blocked(key))