Add the few extra lines required to init gl on Raspberry Pi.
Still needs work in the build system to set this define.
This commit is contained in:
parent
4ae715832e
commit
93d39b34ff
1 changed files with 12 additions and 0 deletions
|
@ -21,6 +21,10 @@
|
||||||
#include "SDL_video.h"
|
#include "SDL_video.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RPI
|
||||||
|
#include <bcm_host.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "base/display.h"
|
#include "base/display.h"
|
||||||
|
@ -383,6 +387,10 @@ void ToggleFullScreenIfFlagSet() {
|
||||||
#undef main
|
#undef main
|
||||||
#endif
|
#endif
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
#ifdef RPI
|
||||||
|
bcm_host_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Avoid warning about conversion from const char * to char *
|
// Avoid warning about conversion from const char * to char *
|
||||||
char envTemp[256];
|
char envTemp[256];
|
||||||
strcpy(envTemp, "SDL_VIDEO_CENTERED=1");
|
strcpy(envTemp, "SDL_VIDEO_CENTERED=1");
|
||||||
|
@ -802,6 +810,10 @@ int main(int argc, char *argv[]) {
|
||||||
#endif
|
#endif
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
net::Shutdown();
|
net::Shutdown();
|
||||||
|
#ifdef RPI
|
||||||
|
bcm_host_deinit();
|
||||||
|
#endif
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue