gb.h: add include guards for C++ projects

This is helpful for C++ projects like bsnes that wish to include gb.h
without needing to set extern "C" themselves.
This commit is contained in:
orbea 2023-12-28 09:59:33 -08:00
parent e666ec09db
commit 8cf319e941
1 changed files with 9 additions and 0 deletions

View File

@ -1,4 +1,9 @@
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include <stdint.h>
#include <stdalign.h>
@ -1028,3 +1033,7 @@ internal void GB_clear_running_thread(GB_gameboy_t *gb);
#endif
#endif
#ifdef __cplusplus
}
#endif