Several small changes:

- Fixed keyboard navigation into help menu (do not exit immediately)
- Fixed forgotten size parameter to CSPList in game_ctrl.cpp
- Added std:: prefix to exit() call
- Do not use atoi to convert a char to an integer

git-svn-id: https://svn.code.sf.net/p/extremetuxracer/code/trunk@613 0420edf4-82e4-42fc-9478-35b55e6d67a3
master
pkeus 2016-01-21 14:37:58 +00:00
parent ed21733eb5
commit e1d7d0b848
5 changed files with 7 additions and 7 deletions

View File

@ -197,7 +197,7 @@ bool CPlayers::LoadPlayers() {
void CPlayers::SavePlayers() const {
std::string playerfile = param.config_dir + SEP "players";
CSPList list(plyr.size());
CSPList list;
for (std::size_t i=0; i<plyr.size(); i++) {
std::string item = "*[name]" + plyr[i].name;
item +="[avatar]" + plyr[i].avatar->filename;

View File

@ -36,6 +36,7 @@ TLabel* texts[TEXT_LINES];
TLabel* footnote;
void CHelp::Keyb(sf::Keyboard::Key key, bool release, int x, int y) {
if (release) return;
State::manager.RequestEnterState(*State::manager.PreviousState());
}

View File

@ -245,10 +245,9 @@ void CTexture::DrawFrame(std::size_t idx, int x, int y, double w, double h, int
void CTexture::DrawNumChr(char c, int x, int y, int w, int h) {
int idx;
if (std::isdigit(c)) {
char chrname[2] = {c, '\0'};
idx = atoi(chrname);
} else if (c == ':')
if (std::isdigit(c))
idx = c - '0';
else if (c == ':')
idx = 10;
else if (c == ' ')
idx = 11;

View File

@ -319,7 +319,7 @@ static char p_vertex_code[6];
void SetupViewFrustum(const CControl *ctrl) {
double aspect = (double) Winsys.resolution.width /Winsys.resolution.height;
double aspect = (double)Winsys.resolution.width/Winsys.resolution.height;
double near_dist = NEAR_CLIP_DIST;
double far_dist = param.forward_clip_distance;

View File

@ -133,7 +133,7 @@ void CWinsys::Quit() {
void CWinsys::Terminate() {
Quit();
exit(0);
std::exit(0);
}
void CWinsys::PrintJoystickInfo() const {