mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
* Add dummy game ai subsystem * First working prototype of a machine learning model that can override player input * Update README.md * Update README.md * Fix loading path on Windows * Change ai override to player 2 * Added quick menu show game ai option * Implemented Quick Menu entry for Game AI options * Redirect debug logs to retroarch log system + properly support player override * Added support to use framebuffer as input to the AI * Added pixel format parameter to API * Fix game name * code clean-up of game_ai.cpp * Update README.md - Windows Build * Update README.md * Update README.md * Update README.md * Update config.params.sh turn off GAME_AI feature by default * Fix compile error in menu_displaylist.c * Add missing #define in menu_cbs_title.c * Added new game_ai entry in griffin_cpp * Remove GAME_AI entry in msg_hash_us.c * Fix compile error in menu_displaylist.h * Removed GAME AI references from README.md * Fixes coding style + add GameAI lib API header * Convert comment to legacy + remove unused code * Additional coding style fixes to game_ai.cpp * Fix identation issues in game_ai.cpp * Removed some debug code in game_ai.cpp * Add game_ai_lib in deps * Replace assert with retro_assert * Update Makefile.common * Converting game_ai from cpp to c. First step. * Convert game_ai from CPP to C. STEP 2: add C function calls * Convert game_ai from CPP to C. Final Step * Added shutdown function for game ai lib * Update game_ai_lib README * Fix crash when loading/unloading multiple games
59 lines
No EOL
1.8 KiB
C
59 lines
No EOL
1.8 KiB
C
#ifndef _UNISTD_H
|
|
#define _UNISTD_H 1
|
|
|
|
/* This file intended to serve as a drop-in replacement for
|
|
* unistd.h on Windows.
|
|
* Please add functionality as neeeded.
|
|
* Original file from: http://stackoverflow.com/a/826027
|
|
*/
|
|
|
|
#include <stdlib.h>
|
|
#include <io.h>
|
|
//#include <getopt.h> /* getopt at: https://gist.github.com/bikerm16/1b75e2dd20d839dcea58 */
|
|
#include <process.h> /* for getpid() and the exec..() family */
|
|
#include <direct.h> /* for _getcwd() and _chdir() */
|
|
|
|
#define srandom srand
|
|
#define random rand
|
|
|
|
/* Values for the second argument to access.
|
|
These may be OR'd together. */
|
|
#define R_OK 4 /* Test for read permission. */
|
|
#define W_OK 2 /* Test for write permission. */
|
|
#define X_OK R_OK /* execute permission - unsupported in Windows,
|
|
use R_OK instead. */
|
|
#define F_OK 0 /* Test for existence. */
|
|
|
|
#define access _access
|
|
#define dup2 _dup2
|
|
#define execve _execve
|
|
#define ftruncate _chsize
|
|
#define unlink _unlink
|
|
#define fileno _fileno
|
|
#define getcwd _getcwd
|
|
#define chdir _chdir
|
|
#define isatty _isatty
|
|
#define lseek _lseek
|
|
/* read, write, and close are NOT being #defined here,
|
|
* because while there are file handle specific versions for Windows,
|
|
* they probably don't work for sockets.
|
|
* You need to look at your app and consider whether
|
|
* to call e.g. closesocket().
|
|
*/
|
|
|
|
#define ssize_t int
|
|
|
|
#define STDIN_FILENO 0
|
|
#define STDOUT_FILENO 1
|
|
#define STDERR_FILENO 2
|
|
/* should be in some equivalent to <sys/types.h> */
|
|
//typedef __int8 int8_t;
|
|
typedef __int16 int16_t;
|
|
typedef __int32 int32_t;
|
|
typedef __int64 int64_t;
|
|
typedef unsigned __int8 uint8_t;
|
|
typedef unsigned __int16 uint16_t;
|
|
typedef unsigned __int32 uint32_t;
|
|
typedef unsigned __int64 uint64_t;
|
|
|
|
#endif /* unistd.h */ |