mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 16:46:31 +00:00
Initialize nacl_io the correct way for BSD socket emulation to work
This commit is contained in:
parent
80b1bbfca3
commit
2e52d68fd7
7
main.cpp
7
main.cpp
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user