Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdbool.h>
- #include <stdint.h>
- #include "nintaco.h"
- NintacoAPI* api;
- void apiEnabled(NintacoAPI* api) {
- puts("API enabled");
- }
- void apiDisabled(NintacoAPI* api) {
- puts("API disabled");
- }
- void dispose(NintacoAPI* api) {
- puts("API stopped");
- }
- void statusChanged(NintacoAPI* api, char* message) {
- printf("Status message: %s\n", message);
- }
- void renderFinished(NintacoAPI* ap) {
- int pixs[61440];
- getPixels(api,pixs);
- }
- int main(int argc, char** argv) {
- api = newNintacoAPI("localhost", 9999);
- addFrameListener(api, &renderFinished);
- addStatusListener(api, &statusChanged);
- addActivateListener(api, &apiEnabled);
- addDeactivateListener(api, &apiDisabled);
- addStopListener(api, &dispose);
- run(api);
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement