Skip to content

Commit

Permalink
COMMON: Add initPlatform() to util.h/.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Oct 19, 2016
1 parent 3cfd848 commit efe43ed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,20 @@

#include "src/common/error.h"
#include "src/common/ustring.h"
#include "src/common/platform.h"
#include "src/common/readstream.h"
#include "src/common/writefile.h"

#include "src/util.h"

void initPlatform() {
try {
Common::Platform::init();
} catch (...) {
Common::exceptionDispatcherError("Failed to initialize the low-level platform-specific subsytem");
}
}

void dumpStream(Common::SeekableReadStream &stream, const Common::UString &fileName) {
Common::WriteFile file;
if (!file.open(fileName))
Expand Down
2 changes: 2 additions & 0 deletions src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ namespace Common {
class SeekableReadStream;
}

void initPlatform();

void dumpStream(Common::SeekableReadStream &stream, const Common::UString &fileName);

#endif // UTIL_H

0 comments on commit efe43ed

Please sign in to comment.