diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mame/video/chihiro.c | 7 | ||||
-rw-r--r-- | src/osd/modules/lib/osdlib_os2.c | 5 | ||||
-rw-r--r-- | src/osd/modules/sync/sync_os2.c | 12 | ||||
-rw-r--r-- | src/osd/sdl/sdl.mak | 1 | ||||
-rw-r--r-- | src/osd/sdl/sdlfile.c | 4 | ||||
-rw-r--r-- | src/osd/sdl/sdlos_os2.c | 66 |
6 files changed, 14 insertions, 81 deletions
diff --git a/src/mame/video/chihiro.c b/src/mame/video/chihiro.c index 69a6e50e812..951fa0d7562 100644 --- a/src/mame/video/chihiro.c +++ b/src/mame/video/chihiro.c @@ -837,7 +837,14 @@ void vertex_program_simulator::compute_scalar_operation(float t_out[4], int inst case 6: // "LOG" t_out[1] = frexp(par_in[p3_C + 0], &e)*2.0; // frexp gives mantissa as 0.5....1 t_out[0] = e - 1; +#ifndef __OS2__ t.f = log2(abs(par_in[p3_C + 0])); +#else + static double log_2 = 0.0; + if (log_2 == 0.0) + log_2 = log(2); + t.f = log(abs(par_in[p3_C + 0])) / log_2; +#endif t.i = t.i & 0xffffff00; t_out[2] = t.f; t_out[3] = 1.0; diff --git a/src/osd/modules/lib/osdlib_os2.c b/src/osd/modules/lib/osdlib_os2.c index 9e1ab8fd52d..93f1ca97f44 100644 --- a/src/osd/modules/lib/osdlib_os2.c +++ b/src/osd/modules/lib/osdlib_os2.c @@ -49,7 +49,10 @@ int osd_setenv(const char *name, const char *value, int overwrite) void osd_process_kill(void) { - fprintf(stderr,"osd_process_kill missing in OS/2 build\n"); + PPIB ppib; + + DosGetInfoBlocks(NULL, &ppib); + DosKillProcess(DKP_PROCESSTREE, ppib->pib_ulpid); } //============================================================ diff --git a/src/osd/modules/sync/sync_os2.c b/src/osd/modules/sync/sync_os2.c index 9c0612c1288..5526b26cf3b 100644 --- a/src/osd/modules/sync/sync_os2.c +++ b/src/osd/modules/sync/sync_os2.c @@ -479,15 +479,3 @@ void osd_thread_wait_free(osd_thread *thread) DosWaitThread(&tid, 0); free(thread); } - -//============================================================ -// osd_process_kill -//============================================================ - -void osd_process_kill(void) -{ - PPIB ppib; - - DosGetInfoBlocks(NULL, &ppib); - DosKillProcess(DKP_PROCESSTREE, ppib->pib_ulpid); -} diff --git a/src/osd/sdl/sdl.mak b/src/osd/sdl/sdl.mak index 479abdd6624..5fe16406090 100644 --- a/src/osd/sdl/sdl.mak +++ b/src/osd/sdl/sdl.mak @@ -752,6 +752,7 @@ SDLLIBS := $(shell sdl-config --libs) INCPATH += $(SDLCFLAGS) LIBS += $(SDLLIBS) -lpthread +BASELIBS += += $(SDLLIBS) -lpthread endif # OS2 diff --git a/src/osd/sdl/sdlfile.c b/src/osd/sdl/sdlfile.c index 5dc2b309cc9..a010c02776a 100644 --- a/src/osd/sdl/sdlfile.c +++ b/src/osd/sdl/sdlfile.c @@ -507,13 +507,13 @@ osd_directory_entry *osd_stat(const char *path) { int err; osd_directory_entry *result = NULL; - #if defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) || defined(SDLMAME_DARWIN) + #if defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) || defined(SDLMAME_DARWIN) || defined(SDLMAME_OS2) struct stat st; #else struct stat64 st; #endif - #if defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) || defined(SDLMAME_DARWIN) + #if defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) || defined(SDLMAME_DARWIN) || defined(SDLMAME_OS2) err = stat(path, &st); #else err = stat64(path, &st); diff --git a/src/osd/sdl/sdlos_os2.c b/src/osd/sdl/sdlos_os2.c index 2137bace1b4..4aa5450bcb7 100644 --- a/src/osd/sdl/sdlos_os2.c +++ b/src/osd/sdl/sdlos_os2.c @@ -23,7 +23,6 @@ // MAME headers #include "osdcore.h" -#include "osdlib.h" //============================================================ // osd_get_clipboard_text @@ -36,68 +35,3 @@ char *osd_get_clipboard_text(void) return result; } - -//============================================================ -// osd_stat -//============================================================ - -osd_directory_entry *osd_stat(const char *path) -{ - int err; - osd_directory_entry *result = NULL; - struct stat st; - - err = stat(path, &st); - - if( err == -1) return NULL; - - // create an osd_directory_entry; be sure to make sure that the caller can - // free all resources by just freeing the resulting osd_directory_entry - result = (osd_directory_entry *) osd_malloc_array(sizeof(*result) + strlen(path) + 1); - strcpy(((char *) result) + sizeof(*result), path); - result->name = ((char *) result) + sizeof(*result); - result->type = S_ISDIR(st.st_mode) ? ENTTYPE_DIR : ENTTYPE_FILE; - result->size = (UINT64)st.st_size; - - return result; -} - -//============================================================ -// osd_get_volume_name -//============================================================ - -const char *osd_get_volume_name(int idx) -{ - static char szDrive[] = "A:\\"; - - ULONG ulCurDisk; - ULONG ulDriveMap; - - DosQueryCurrentDisk(&ulCurDisk, &ulDriveMap); - - szDrive[ 0 ] = 'A'; - while(idx--) { - do - { - ulDriveMap >>= 1; - szDrive[ 0 ]++; - } while(ulDriveMap && (ulDriveMap & 1) == 0); - if (!ulDriveMap) return NULL; - } - - return szDrive; -} - -//============================================================ -// osd_get_full_path -//============================================================ - -file_error osd_get_full_path(char **dst, const char *path) -{ - *dst = (char *)osd_malloc_array(CCHMAXPATH + 1); - if (*dst == NULL) - return FILERR_OUT_OF_MEMORY; - - _abspath(*dst, path, CCHMAXPATH + 1); - return FILERR_NONE; -} |