Fixed up some things that were causing compiler warnings.

This commit is contained in:
Aloshi 2012-10-28 18:07:05 -05:00
parent c8165cd947
commit 3ebb819a7c
5 changed files with 15 additions and 4 deletions

View file

@ -8,6 +8,7 @@
class FileData
{
public:
virtual ~FileData() { };
virtual bool isFolder() = 0;
virtual std::string getName() = 0;
virtual std::string getPath() = 0;

View file

@ -149,6 +149,8 @@ void Font::buildAtlas()
x += g->bitmap.width;
}
std::cout << "Final texture coords: " << x << ", " << y << "\n";
glBindTexture(GL_TEXTURE_2D, 0);
//std::cout << "generated texture \"" << textureID << "\" (w: " << w << " h: " << h << ")" << std::endl;

View file

@ -84,10 +84,11 @@ void SystemData::launchGame(GameData* game)
std::cout << " " << command << "\n";
std::cout << "=====================================================\n";
system(command.c_str());
int exitCode = system(command.c_str());
std::cout << "=====================================================\n";
std::cout << "...launch terminated!\n";
if(exitCode != 0)
std::cout << "...launch terminated with nonzero exit code!\n";
Renderer::init(0, 0);
AudioManager::init();

View file

@ -126,7 +126,7 @@ void GuiFastSelect::setListPos()
int min = 0;
int max = mList->getObjectCount() - 1;
int mid;
int mid = 0;
while(max >= min)
{

View file

@ -41,7 +41,10 @@ void GuiMenu::onInput(InputManager::InputButton button, bool keyDown)
if(button == InputManager::BUTTON1 && keyDown)
{
system(mList->getSelectedObject().c_str());
if(system(mList->getSelectedObject().c_str()) != 0)
{
std::cout << "(menu command terminated with a nonzero errorcode)\n";
}
}
}
@ -49,6 +52,10 @@ void GuiMenu::populateList()
{
mList->clear();
//if you want to add your own commands to the menu, here is where you need to change!
//commands added here are called with system() when selected (so are executed as shell commands)
//the method is GuiList::addObject(std::string displayString, std::string commandString, unsigned int displayHexColor);
//the list will automatically adjust as items are added to it, this should be the only area you need to change
mList->addObject("Restart", "sudo shutdown -r now", 0x0000FFFF);
mList->addObject("Shutdown", "sudo shutdown -h now", 0x0000FFFF);
}