summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.mk2
-rw-r--r--config.c2
-rw-r--r--util.c10
-rw-r--r--util.h6
4 files changed, 10 insertions, 10 deletions
diff --git a/Android.mk b/Android.mk
index 27c5b60..e0b2343 100644
--- a/Android.mk
+++ b/Android.mk
@@ -15,7 +15,7 @@ LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.c \
68kinst.c debug.c gst.c psg.c z80_to_x86.c backend.c io.c render_sdl.c \
tern.c backend_x86.c gdb_remote.c m68k_core.c romdb.c m68k_core_x86.c \
util.c wave.c blastem.c gen.c mem.c vdp.c ym2612.c config.c gen_x86.c \
- terminal.c z80inst.c
+ terminal.c z80inst.c menu.c
LOCAL_SHARED_LIBRARIES := SDL2
diff --git a/config.c b/config.c
index f64ef4a..9930b73 100644
--- a/config.c
+++ b/config.c
@@ -129,7 +129,7 @@ tern_node *parse_bundled_config(char *config_name)
tern_node *load_config()
{
- char *confdir = get_config_dir();
+ char const *confdir = get_config_dir();
char *confpath = NULL;
tern_node *ret;
if (confdir) {
diff --git a/util.c b/util.c
index d579348..5eb5545 100644
--- a/util.c
+++ b/util.c
@@ -13,7 +13,7 @@
#include "render.h" //for render_errorbox
#include "util.h"
-char * alloc_concat(char * first, char * second)
+char * alloc_concat(char const * first, char const * second)
{
int flen = strlen(first);
int slen = strlen(second);
@@ -23,7 +23,7 @@ char * alloc_concat(char * first, char * second)
return ret;
}
-char * alloc_concat_m(int num_parts, char ** parts)
+char * alloc_concat_m(int num_parts, char const ** parts)
{
int total = 0;
for (int i = 0; i < num_parts; i++) {
@@ -327,7 +327,7 @@ void free_dir_list(dir_entry *list, size_t numentries)
#include <SDL.h>
char *read_bundled_file(char *name, long *sizeret)
{
- SDL_RWops *rw = SDL_RWFromFile(config_path, "rb");
+ SDL_RWops *rw = SDL_RWFromFile(name, "rb");
if (!rw) {
if (sizeret) {
*sizeret = -1;
@@ -353,7 +353,7 @@ char *read_bundled_file(char *name, long *sizeret)
return ret;
}
-char *get_config_dir()
+char const *get_config_dir()
{
return SDL_AndroidGetInternalStoragePath();
}
@@ -399,7 +399,7 @@ char *read_bundled_file(char *name, long *sizeret)
return ret;
}
-char *get_config_dir()
+char const *get_config_dir()
{
static char* confdir;
if (!confdir) {
diff --git a/util.h b/util.h
index f299906..c6eef76 100644
--- a/util.h
+++ b/util.h
@@ -11,9 +11,9 @@ typedef struct {
//Utility functions
//Allocates a new string containing the concatenation of first and second
-char * alloc_concat(char * first, char * second);
+char * alloc_concat(char const * first, char const * second);
//Allocates a new string containing the concatenation of the strings pointed to by parts
-char * alloc_concat_m(int num_parts, char ** parts);
+char * alloc_concat_m(int num_parts, char const ** parts);
//Returns the size of a file using fseek and ftell
long file_size(FILE * f);
//Strips whitespace and non-printable characters from the beginning and end of a string
@@ -29,7 +29,7 @@ char * get_exe_dir();
//Returns the user's home directory
char * get_home_dir();
//Returns an appropriate path for storing config files
-char *get_config_dir();
+char const *get_config_dir();
//Reads a file bundled with the executable
char *read_bundled_file(char *name, long *sizeret);
//Retunrs an array of normal files and directories residing in a directory