mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Enabled CEF debugging.
on localhost:8080.
This commit is contained in:
+14
-5
@@ -195,15 +195,26 @@ namespace loot {
|
||||
CefSettings LootApp::GetCefSettings() const {
|
||||
CefSettings cef_settings;
|
||||
|
||||
//Disable CEF logging.
|
||||
//Disable CEF command line args.
|
||||
cef_settings.command_line_args_disabled = true;
|
||||
if (_settings["Language"]) {
|
||||
|
||||
// Don't set CEF locale, as it tries to load resources and crashes
|
||||
// if they can't be found.
|
||||
/*if (_settings["Language"]) {
|
||||
loot::Language lang(_settings["Language"].as<string>());
|
||||
CefString(&cef_settings.locale).FromString(lang.Locale());
|
||||
}
|
||||
}*/
|
||||
|
||||
// Set CEF logging.
|
||||
CefString(&cef_settings.log_file).FromString("CEFDebugLog.txt");
|
||||
if (!_settings["Debug Verbosity"] || _settings["Debug Verbosity"].as<unsigned int>() == 0)
|
||||
cef_settings.log_severity = LOGSEVERITY_DISABLE;
|
||||
|
||||
// Enable remote debugging.
|
||||
//cef_settings.single_process = true;
|
||||
cef_settings.remote_debugging_port = 8080;
|
||||
|
||||
|
||||
// Use cef_settings.resources_dir_path to specify Resources folder path.
|
||||
// Use cef_settings.locales_dir_path to specify locales folder path.
|
||||
|
||||
@@ -266,8 +277,6 @@ namespace loot {
|
||||
message_router_->OnContextCreated(browser, frame, context);
|
||||
|
||||
_context = context;
|
||||
|
||||
InitJSVars();
|
||||
}
|
||||
|
||||
void LootApp::OnContextReleased(CefRefPtr<CefBrowser> browser,
|
||||
|
||||
@@ -123,11 +123,6 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmd
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Do application init
|
||||
//--------------------
|
||||
|
||||
app.get()->Init(gameStr);
|
||||
|
||||
// Back to CEF
|
||||
//------------
|
||||
|
||||
@@ -137,6 +132,11 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmd
|
||||
// Initialize CEF.
|
||||
CefInitialize(main_args, cef_settings, app.get(), sandbox_info);
|
||||
|
||||
// Do application init
|
||||
//--------------------
|
||||
|
||||
app.get()->Init(gameStr);
|
||||
|
||||
// Run the CEF message loop. This will block until CefQuitMessageLoop() is called.
|
||||
CefRunMessageLoop();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user