| OLD | NEW |
| 1 /* Copyright 2015 The Chromium Authors. All rights reserved. | 1 /* Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. */ | 3 * found in the LICENSE file. */ |
| 4 | 4 |
| 5 #include "ppapi_simple/ps_main.h" | 5 #include "ppapi_simple/ps_main.h" |
| 6 | 6 |
| 7 #ifdef __native_client__ | 7 #ifdef __native_client__ |
| 8 #include <irt.h> | 8 #include <irt.h> |
| 9 #include <irt_ppapi.h> | 9 #include <irt_ppapi.h> |
| 10 #endif | 10 #endif |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 struct nacl_irt_ppapihook hooks; | 30 struct nacl_irt_ppapihook hooks; |
| 31 if (nacl_interface_query(NACL_IRT_PPAPIHOOK_v0_1, &hooks, sizeof(hooks)) == | 31 if (nacl_interface_query(NACL_IRT_PPAPIHOOK_v0_1, &hooks, sizeof(hooks)) == |
| 32 sizeof(hooks)) { | 32 sizeof(hooks)) { |
| 33 return PpapiPluginMain(); | 33 return PpapiPluginMain(); |
| 34 } | 34 } |
| 35 #else | 35 #else |
| 36 int main(int argc, char* argv[]) { | 36 int main(int argc, char* argv[]) { |
| 37 #endif | 37 #endif |
| 38 // By default, or if not running in the browser we simply run the main | 38 // By default, or if not running in the browser we simply run the main |
| 39 // entry point directly, on the main thread. | 39 // entry point directly, on the main thread. |
| 40 int rtn = nacl_io_init(); | 40 return PSUserMainGet()(argc, argv); |
| 41 if (rtn != 0) | |
| 42 return rtn; | |
| 43 rtn = PSUserMainGet()(argc, argv); | |
| 44 nacl_io_uninit(); | |
| 45 return rtn; | |
| 46 } | 41 } |
| OLD | NEW |