Fixed all my pointers

This commit is contained in:
2022-10-19 19:44:47 -07:00
parent f0cbae4cf8
commit acc9d798cb
31 changed files with 289 additions and 141 deletions

View File

@ -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;