forked from KolibriOS/kolibrios
DGEN:
- Fixed create .dgen dir bug; - Disable debug output; - Moved all build definitions to config.h. git-svn-id: svn://kolibrios.org@9840 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
727601bd4c
commit
946e1c6b5f
@ -1,15 +1,14 @@
|
||||
if tup.getconfig("NO_GCC") ~= "" then return end
|
||||
if tup.getconfig("HELPERDIR") == ""
|
||||
then
|
||||
if tup.getconfig("NO_NASM") ~= "" then return end -- required for SDL compilation
|
||||
if tup.getconfig("NO_NASM") ~= "" then return end
|
||||
HELPERDIR = "../../"
|
||||
end
|
||||
tup.include(HELPERDIR .. "/use_gcc.lua")
|
||||
tup.include(HELPERDIR .. "/use_newlib.lua")
|
||||
tup.include(HELPERDIR .. "/use_sdl_newlib.lua")
|
||||
|
||||
CFLAGS = CFLAGS_OPTIMIZE_SPEED ..[[ -DPACKAGE_NAME=\"DGen/SDL\" -DPACKAGE_TARNAME=\"dgen-sdl\" -DPACKAGE_VERSION=\"1.33\" -DPACKAGE_STRING=\"DGen/SDL\ 1.33\" -DPACKAGE_BUGREPORT=\"zamaz@users.sourceforge.net\" -DPACKAGE_URL=\"http://sourceforge.net/projects/dgen\" -DPACKAGE=\"dgen-sdl\" -DVERSION=\"1.33\" -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FTELLO=1 -DHAVE_GLOB_H=1 -DWITH_JOYSTICK=1 -DWITH_MUSA=1 -DWITH_STAR=1 -DWITH_MZ80=1 -DWITH_CZ80=1 -DWITH_X86_ASM=1 -DHAVE_MEMCPY_H=1 -DWITH_CTV=1 -DWITH_SCALE2X=1 -DWITH_X86_MZ80=1 -DWITH_X86_MMX=1 -DWITH_X86_CTV=1 -DWITH_X86_TILES=1 ]]
|
||||
|
||||
CFLAGS = CFLAGS_OPTIMIZE_SPEED
|
||||
LDFLAGS = LDFLAGS .. " --subsystem native"
|
||||
INCLUDES = INCLUDES .. " -Isdl -I. -Iscale2x"
|
||||
|
||||
|
33
programs/emulator/dgen-sdl-1.33/config.h
Normal file
33
programs/emulator/dgen-sdl-1.33/config.h
Normal file
@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#define PACKAGE_NAME "DGen/SDL"
|
||||
#define PACKAGE_TARNAME "dgen-sdl"
|
||||
#define PACKAGE_VERSION "1.33"
|
||||
#define PACKAGE_STRING "DGen/SDL-1.33"
|
||||
#define PACKAGE_BUGREPORT "zamaz@users.sourceforge.net"
|
||||
#define PACKAGE_URL "http://sourceforge.net/projects/dgen"
|
||||
#define PACKAGE "dgen-sdl"
|
||||
#define VERSION "1.33"
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_FTELLO 1
|
||||
#define HAVE_GLOB_H 1
|
||||
#define WITH_MUSA 1
|
||||
#define WITH_STAR 1
|
||||
#define WITH_MZ80 1
|
||||
#define WITH_CZ80 1
|
||||
#define WITH_X86_ASM 1
|
||||
#define HAVE_MEMCPY_H 1
|
||||
#define WITH_CTV 1
|
||||
#define WITH_SCALE2X 1
|
||||
#define WITH_X86_MZ80 1
|
||||
#define WITH_X86_MMX 1
|
||||
#define WITH_X86_CTV 1
|
||||
#define WITH_X86_TILES 1
|
||||
#define NDEBUG
|
@ -3,6 +3,8 @@
|
||||
#ifndef __MD_H__
|
||||
#define __MD_H__
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define VER VERSION
|
||||
|
||||
#include <stdint.h>
|
||||
|
@ -6309,8 +6309,8 @@ int pd_handle_events(md &megad)
|
||||
};
|
||||
unsigned int hat_value_map;
|
||||
intptr_t joypad;
|
||||
bool pressed;
|
||||
#endif
|
||||
bool pressed;
|
||||
uint32_t plist[8];
|
||||
uint32_t rlist[8];
|
||||
unsigned int i, pi, ri;
|
||||
|
@ -40,7 +40,8 @@
|
||||
#endif
|
||||
|
||||
#ifdef _KOLIBRI
|
||||
char* dgen_conf_dir = "/tmp0/1";
|
||||
char* kos_dgen_userdir = "/tmp0/1";
|
||||
|
||||
#endif
|
||||
|
||||
static const char *fopen_mode(unsigned int mode)
|
||||
@ -181,7 +182,7 @@ char *dgen_userdir(char *buf, size_t *size)
|
||||
}
|
||||
#ifndef __MINGW32__
|
||||
#ifdef _KOLIBRI
|
||||
strncpy(path, dgen_conf_dir, sz_dir);
|
||||
strncpy(path, kos_dgen_userdir, sz_dir);
|
||||
#else
|
||||
strncpy(path, pwd->pw_dir, sz_dir);
|
||||
#endif
|
||||
@ -231,7 +232,7 @@ char *dgen_dir(char *buf, size_t *size, const char *sub)
|
||||
return NULL;
|
||||
sz_dir = strlen(pwd->pw_dir);
|
||||
#else
|
||||
sz_dir = strlen(dgen_conf_dir);
|
||||
sz_dir = strlen(kos_dgen_userdir);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -263,7 +264,7 @@ char *dgen_dir(char *buf, size_t *size, const char *sub)
|
||||
#ifndef _KOLIBRI
|
||||
strncpy(path, pwd->pw_dir, sz_dir);
|
||||
#else
|
||||
strncpy(path, dgen_conf_dir, sz_dir);
|
||||
strncpy(path, kos_dgen_userdir, sz_dir);
|
||||
#endif
|
||||
#else
|
||||
if (SHGetFolderPath(NULL, (CSIDL_APPDATA | CSIDL_FLAG_CREATE),
|
||||
@ -352,9 +353,12 @@ FILE *dgen_freopen(const char *relative, const char *file, unsigned int mode,
|
||||
goto error;
|
||||
size = strlen(path);
|
||||
}
|
||||
printf("HOME=%s\n", path);
|
||||
#ifndef KOLIBRI
|
||||
if ((mode & (DGEN_WRITE | DGEN_APPEND)) && (path != NULL))
|
||||
mkdir(path, 0777); /* XXX make that recursive */
|
||||
#else
|
||||
mkdir(path, 0777);
|
||||
#endif
|
||||
file_size = strlen(file);
|
||||
if ((tmp = realloc(path, (size + !!size + file_size + 1))) == NULL)
|
||||
goto error;
|
||||
@ -374,7 +378,6 @@ FILE *dgen_freopen(const char *relative, const char *file, unsigned int mode,
|
||||
errno = e;
|
||||
return f;
|
||||
error:
|
||||
puts("ERROR");
|
||||
free(path);
|
||||
errno = EACCES;
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user