Advertisement
Guest User

Untitled

a guest
May 22nd, 2017
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <stdbool.h>
  4. #include <stdint.h>
  5. #include "nintaco.h"
  6.  
  7.  
  8.  
  9. NintacoAPI* api;
  10.  
  11.  
  12.  
  13. void apiEnabled(NintacoAPI* api) {
  14.  
  15.  
  16. puts("API enabled");
  17.  
  18.  
  19. }
  20.  
  21. void apiDisabled(NintacoAPI* api) {
  22. puts("API disabled");
  23. }
  24.  
  25. void dispose(NintacoAPI* api) {
  26. puts("API stopped");
  27. }
  28.  
  29. void statusChanged(NintacoAPI* api, char* message) {
  30. printf("Status message: %s\n", message);
  31. }
  32.  
  33. void renderFinished(NintacoAPI* ap) {
  34.  
  35. int pixs[61440];
  36. getPixels(api,pixs);
  37.  
  38. }
  39.  
  40. int main(int argc, char** argv) {
  41. api = newNintacoAPI("localhost", 9999);
  42. addFrameListener(api, &renderFinished);
  43. addStatusListener(api, &statusChanged);
  44. addActivateListener(api, &apiEnabled);
  45. addDeactivateListener(api, &apiDisabled);
  46. addStopListener(api, &dispose);
  47. run(api);
  48. return EXIT_SUCCESS;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement