• R/O
  • SSH
  • HTTPS

mhack: Commit


Commit MetaInfo

Revision16 (tree)
Time2010-02-21 20:40:22
Authorsatofumi

Log Message

fix error message when font is not found.

Change Summary

Incremental Difference

--- trunk/samples/walkingAtmark/walkingAtmark.cpp (revision 15)
+++ trunk/samples/walkingAtmark/walkingAtmark.cpp (revision 16)
@@ -1,5 +1,5 @@
11 /*!
2- \example '@' が移動するサンプル
2+ \example walkingAtmark.cpp \@ が移動するサンプル
33
44 \author Satofumi KAMIMURA
55
@@ -21,6 +21,7 @@
2121 using namespace qrk;
2222 using namespace std;
2323
24+
2425 namespace {
2526 const char DefaultFont[] = "../../resources/ipagp.otf";
2627 const int FontSize = 32;
@@ -31,7 +32,7 @@
3132 {
3233 Screen screen;
3334 if (! screen.show(SDL_OPENGL)) {
34- cout << "Screen::show(): " << screen.show() << endl;
35+ cout << "Screen::show(): " << screen.what() << endl;
3536 exit(1);
3637 }
3738
@@ -44,7 +45,7 @@
4445 const char* font_file = (argc <= 1) ? DefaultFont : argv[1];
4546 Font font(font_file, FontSize);
4647 if (! font.resource()) {
47- // !!! エラー表示をすべき
48+ cout << "Font: " << font.what() << endl;
4849 exit(1);
4950 }
5051 TextSurface surface(font, "@");
Show on old repository browser