daily pastebin goal
35%
SHARE
TWEET

Untitled

a guest May 22nd, 2017 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top