From 2e32e892540d1afbb59ea056cfe80226174a8f6f Mon Sep 17 00:00:00 2001
From: Edward Rudd <urkle@outoforder.cc>
Date: Tue, 11 Aug 2015 21:39:36 +0000
Subject: [PATCH] base implementation of player fullscreen and volume callbacks into the game
---
client/test/main.cpp | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/client/test/main.cpp b/client/test/main.cpp
index 766b569..8810383 100644
--- a/client/test/main.cpp
+++ b/client/test/main.cpp
@@ -74,11 +74,23 @@
humble_demo_ended();
}
+void setPlayerVolume(float volume, void* data)
+{
+ std::cout << "Adjusting volume to " << volume << "\n";
+}
+
+void setPlayerFullscreen(int fullscreen, void* data)
+{
+ std::cout << "Adjusting display to " << (fullscreen ? "fullscreen" : "windowed") << "\n";
+}
+
int main(int argc, char * argv[])
{
std::cout << "Welcome Main\n";
// call dummy function to init cloud
humble_init();
+ humble_set_callback(HUMBLE_API_CALLBACK_SET_PLAYER_VOLUME, (void*)&setPlayerVolume, NULL);
+ humble_set_callback(HUMBLE_API_CALLBACK_SET_PLAYER_FULLSCREEN, (void*)&setPlayerFullscreen, NULL);
int w, h;
int ret = humble_get_player_size(&w, &h);
--
Gitblit v1.9.3