init some ports

This commit is contained in:
Nishi 2026-05-13 02:19:01 +09:00
commit bb5f269f99
14 changed files with 123 additions and 228 deletions

View file

@ -29,12 +29,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <windows.h>
#endif
#ifdef USE_SDL2
#include <SDL_opengl.h>
#else
#ifndef __APPLE__
#include <GL/gl.h>
#include <GL/glu.h>
#else
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#endif
#endif
#ifdef _EE
#define glFinish(...) {}
#define glDepthRange(...) {}
#define glColor3ub(r,g,b) glColor3f((r) / 255.0, (g) / 255.0, (b) / 255.0)
#elif defined(__vita__)
#define glDrawBuffer(...) {}
#endif
void GL_BeginRendering (int *x, int *y, int *width, int *height);

8
include/port.h Normal file
View file

@ -0,0 +1,8 @@
#if defined(_PSP) || defined(_EE) || defined(__vita__)
#include <sys/socket.h>
typedef socklen_t SOCKLEN_T;
#define NO_FCNTL
#else
typedef int SOCKLEN_T;
#endif

View file

@ -355,3 +355,5 @@ void Port_Step(void);
void Port_GrabPointer(int toggle);
void Port_Shutdown(void);
void Port_SwapBuffer(void);
#include "port.h"

View file

@ -36,11 +36,6 @@ int Sys_FileWrite (int handle, void *data, int count);
int Sys_FileTime (char *path);
void Sys_mkdir (char *path);
//
// memory protection
//
void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length);
//
// system IO
//