mirror of
				https://github.com/coop-deluxe/sm64coopdx.git
				synced 2025-10-30 08:01:01 +00:00 
			
		
		
		
	Better way to detect mingw-w64; fix bettercamera for mingw.org; close
.assets-local.txt before deleting it.
This commit is contained in:
		
							parent
							
								
									fa9af3227e
								
							
						
					
					
						commit
						1b03e251bb
					
				
					 5 changed files with 17 additions and 4 deletions
				
			
		|  | @ -47,6 +47,7 @@ def remove_file(fname): | |||
| def clean_assets(local_asset_file): | ||||
|     assets = set(read_asset_map().keys()) | ||||
|     assets.update(read_local_asset_list(local_asset_file)) | ||||
|     local_asset_file.close() | ||||
|     for fname in list(assets) + [".assets-local.txt"]: | ||||
|         if fname.startswith("@"): | ||||
|             continue | ||||
|  |  | |||
|  | @ -38,11 +38,14 @@ typedef s32 ptrdiff_t; | |||
| #else | ||||
| #include <stddef.h> | ||||
| #include <stdint.h> | ||||
| #if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) | ||||
| #if defined(__MINGW32__)  | ||||
| #include <_mingw.h> | ||||
| #if !defined(__MINGW64_VERSION_MAJOR) | ||||
| typedef long ssize_t; | ||||
| #else | ||||
| typedef ptrdiff_t ssize_t; | ||||
| #endif | ||||
| #endif | ||||
| #endif | ||||
| 
 | ||||
| #endif | ||||
|  |  | |||
|  | @ -30,10 +30,13 @@ | |||
| #include <PR/libaudio.h> | ||||
| #include <PR/libultra.h> | ||||
| 
 | ||||
| #if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) | ||||
| #if defined(__MINGW32__) | ||||
| #include <_mingw.h> | ||||
| #if !defined(__MINGW64_VERSION_MAJOR) | ||||
| #include <string.h> | ||||
| #define bzero(b,len) (memset((b), '\0', (len)), (void) 0) | ||||
| #define bcopy(s1, s2, n) memmove((s2), (s1), (n)) | ||||
| #endif | ||||
| #endif | ||||
| 
 | ||||
| #endif | ||||
|  |  | |||
|  | @ -9,8 +9,11 @@ | |||
| #include "include/text_strings.h" | ||||
| #include "engine/surface_collision.h" | ||||
| #include "pc/configfile.h" | ||||
| #if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)  | ||||
| //quick and dirty fix for some older MinGW.org mingwrt
 | ||||
| #else | ||||
| #include <stdio.h> | ||||
| 
 | ||||
| #endif | ||||
| 
 | ||||
| 
 | ||||
| /**
 | ||||
|  |  | |||
|  | @ -153,7 +153,9 @@ static size_t buf_vbo_num_tris; | |||
| static struct GfxWindowManagerAPI *gfx_wapi; | ||||
| static struct GfxRenderingAPI *gfx_rapi; | ||||
| 
 | ||||
| #if defined(_WIN32) && !defined(__MINGW64_VERSION_MAJOR) | ||||
| #if defined(__MINGW32__)  | ||||
| #include <_mingw.h> | ||||
| #if !defined(__MINGW64_VERSION_MAJOR) | ||||
| #include <windows.h> | ||||
| #define CLOCK_MONOTONIC 0 | ||||
| //https://stackoverflow.com/questions/5404277/porting-clock-gettime-to-windows
 | ||||
|  | @ -168,6 +170,7 @@ int clock_gettime(int arg, struct timespec *spec)      //C-file part | |||
| #else | ||||
| #include <time.h> | ||||
| #endif | ||||
| #endif | ||||
| static unsigned long get_time(void) { | ||||
|     struct timespec ts; | ||||
|     clock_gettime(CLOCK_MONOTONIC, &ts); | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 yksoft1
						yksoft1