emscripten Humble Cloud interface
Edward Rudd
2015-08-11 2e32e892540d1afbb59ea056cfe80226174a8f6f
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);