Fixed all my pointers
This commit is contained in:
@ -12,10 +12,10 @@ int32_t main(int32_t argc, char **args) {
|
||||
|
||||
// Create the host
|
||||
auto host = std::make_shared<DawnHost>();
|
||||
auto game = std::make_shared<DawnGame>(host);
|
||||
auto game = std::make_shared<DawnGame>(*host);
|
||||
|
||||
// Initialize the host and error check
|
||||
result = host->init(std::weak_ptr<DawnGame>(game));
|
||||
result = host->init(*game);
|
||||
switch(result) {
|
||||
case DAWN_HOST_INIT_RESULT_SUCCESS:
|
||||
break;
|
||||
@ -24,7 +24,7 @@ int32_t main(int32_t argc, char **args) {
|
||||
}
|
||||
|
||||
// Request the main loop to start running.
|
||||
result = host->start(std::weak_ptr<DawnGame>(game));
|
||||
result = host->start(*game);
|
||||
switch(result) {
|
||||
case DAWN_HOST_START_RESULT_SUCCESS:
|
||||
break;
|
||||
@ -35,7 +35,7 @@ int32_t main(int32_t argc, char **args) {
|
||||
}
|
||||
|
||||
// Main loop finished without errors, cleanup
|
||||
host->unload(std::weak_ptr<DawnGame>(game));
|
||||
host->unload(*game);
|
||||
|
||||
// Success
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user