mirror of
https://github.com/zebrajr/SamRewritten.git
synced 2025-12-06 12:19:51 +01:00
48 lines
1.3 KiB
C++
48 lines
1.3 KiB
C++
/*************************************
|
|
* Please read the license before modifying or distributing any of the code from
|
|
* this project. Thank you.
|
|
*************************************/
|
|
|
|
#include <iostream>
|
|
#include <gmodule.h>
|
|
//#include <X11/Xlib.h>
|
|
#include "MySteam.h"
|
|
#include "MainPickerWindow.h"
|
|
#include "globals.h"
|
|
|
|
/**************************************
|
|
* Declare global variables imported from globals.h
|
|
**************************************/
|
|
MySteam* g_steam = nullptr;
|
|
MainPickerWindow* g_main_gui = nullptr;
|
|
char* g_cache_folder = nullptr;
|
|
|
|
|
|
|
|
/**************************************
|
|
* Main entry point
|
|
**************************************/
|
|
int
|
|
main(int argc, char *argv[])
|
|
{
|
|
// Test if glib2 is installed, gtk will not work without it.
|
|
if(!g_module_supported()) {
|
|
std::cerr << "Sorry, but gmodules are not supported on your platform :(. Try installing as many gnome libs as you can maybe.." << std::endl;
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
|
|
//XInitThreads();
|
|
gtk_init(&argc, &argv);
|
|
|
|
g_cache_folder = concat(getenv("HOME"), "/.SamRewritten");
|
|
g_steam = MySteam::get_instance();
|
|
g_main_gui = new MainPickerWindow();
|
|
|
|
gtk_widget_show(g_main_gui->get_main_window());
|
|
gtk_main();
|
|
|
|
//steam->launch_game("368230");
|
|
//steam->quit_game();
|
|
|
|
return 0;
|
|
} |