popsdeco

pspio.h : psp -> PC port helper

Aug 23rd, 2011
118
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // pspio.h : psp -> PC port helper
  2.  
  3. #include <stdio.h>
  4. #include <string.h>
  5. #include <stdlib.h>
  6. #include <fcntl.h>
  7. #include <stdarg.h>
  8.  
  9. typedef unsigned char u8;
  10. typedef unsigned short u16;
  11. typedef unsigned int u32;
  12.  
  13. typedef size_t       SceSize;
  14. typedef int         SceUID;
  15. typedef int         SceMode;
  16. typedef off_t       SceOff;
  17. //typedef time_t      ScePspDateTime;
  18. typedef struct stat SceIoStat;
  19.  
  20. #define pspSdkSetK1(k1) (0)
  21. #define scePowerTick(tick) (0)
  22. #define sceKernelExitGame() exit(0);
  23. #if defined(WIN32) || (!defined(__GNUC__) && !defined(__clang__))
  24. #include <windows.h>
  25. #define sceKernelDelayThread(delay) Sleep(delay/1000)
  26. #else
  27. #include <unistd.h>
  28. #define sceKernelDelayThread(delay) usleep(delay)
  29. #endif
  30. #define pspDebugScreenClear()
  31. #define pspDebugScreenSetXY(x,y)
  32.  
  33. #define PSP_O_RDONLY O_RDONLY
  34. #define PSP_O_WRONLY O_WRONLY
  35. #define PSP_O_RDWR   O_RDWR
  36. #define PSP_O_CREAT  O_CREAT
  37. #define PSP_O_TRUNC  O_TRUNC
  38.  
  39. #define PSP_SEEK_SET SEEK_SET
  40. #define PSP_SEEK_CUR SEEK_CUR
  41. #define PSP_SEEK_END SEEK_END
  42.  
  43. #define sceIoOpen open
  44. #define sceIoClose close
  45. #define sceIoRead read
  46. #define sceIoWrite write
  47. #define sceIoLseek lseek
  48. #define sceIoLseek32 lseek
  49. #define sceIoGetStat stat
  50. #define sceIoRemove remove
  51. #define sceIoMkdir mkdir
  52. #define sceIoRmdir rmdir
  53. #define sceIoChdir chdir
  54. #define sceIoRename rename
  55.  
  56. #define Kprintf printf
RAW Paste Data