| 1062 | } |
| 1063 | |
| 1064 | void configAbout() |
| 1065 | { |
| 1066 | if (!s_aboutDisplayStr) |
| 1067 | { |
| 1068 | // The document has not been loaded yet. |
| 1069 | char path[TFE_MAX_PATH]; |
| 1070 | char fileName[TFE_MAX_PATH]; |
| 1071 | strcpy(fileName, "Documentation/markdown/TheForceEngine.md"); |
| 1072 | if (!TFE_Paths::mapSystemPath(fileName)) |
| 1073 | TFE_Paths::appendPath(PATH_PROGRAM, fileName, path); |
| 1074 | else |
| 1075 | strcpy(path, fileName); |
| 1076 | |
| 1077 | FileStream file; |
| 1078 | if (file.open(path, Stream::MODE_READ)) |
| 1079 | { |
| 1080 | const size_t len = file.getSize(); |
| 1081 | s_aboutDisplayStr = new char[len + 1]; |
| 1082 | file.readBuffer(s_aboutDisplayStr, (u32)len); |
| 1083 | s_aboutDisplayStr[len] = 0; |
| 1084 | |
| 1085 | file.close(); |
| 1086 | } |
| 1087 | } |
| 1088 | |
| 1089 | if (s_aboutDisplayStr) { TFE_Markdown::draw(s_aboutDisplayStr); } |
| 1090 | } |
| 1091 | |
| 1092 | void configGame() |
| 1093 | { |
no test coverage detected