mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2026-06-17 22:32:06 +00:00
Initialize nacl_io the correct way for BSD socket emulation to work
This commit is contained in:
@@ -6,7 +6,10 @@
|
|||||||
|
|
||||||
class MoonlightInstance : public pp::Instance {
|
class MoonlightInstance : public pp::Instance {
|
||||||
public:
|
public:
|
||||||
explicit MoonlightInstance(PP_Instance instance) : pp::Instance(instance) {}
|
explicit MoonlightInstance(PP_Instance instance) : pp::Instance(instance) {
|
||||||
|
// This function MUST be used otherwise sockets don't work (nacl_io_init() doesn't work!)
|
||||||
|
nacl_io_init_ppapi(pp_instance(), pp::Module::Get()->get_browser_interface());
|
||||||
|
}
|
||||||
virtual ~MoonlightInstance() {}
|
virtual ~MoonlightInstance() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -22,8 +25,6 @@ class MoonlightModule : public pp::Module {
|
|||||||
|
|
||||||
namespace pp {
|
namespace pp {
|
||||||
Module* CreateModule() {
|
Module* CreateModule() {
|
||||||
// Initialize nacl_io before entering moonlight-common-c for BSD sockets
|
|
||||||
nacl_io_init();
|
|
||||||
|
|
||||||
return new MoonlightModule();
|
return new MoonlightModule();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user