|
Sunshine master
Self-hosted game stream host for Moonlight.
|
Definitions for the main entry point for Sunshine. More...
#include <codecvt>#include <csignal>#include <filesystem>#include <fstream>#include <iostream>#include <mach-o/dyld.h>#include <rs.h>#include "confighttp.h"#include "display_device.h"#include "entry_handler.h"#include "globals.h"#include "httpcommon.h"#include "logging.h"#include "main.h"#include "nvhttp.h"#include "process.h"#include "system_tray.h"#include "upnp.h"#include "video.h"Functions | |
| WINAPI BOOL | ConsoleCtrlHandler (DWORD type) |
| Handle Windows console control events for shutdown. | |
| int | main (int argc, char *argv[]) |
| Run the main application or worker loop. | |
| void | mainThreadLoop (const std::shared_ptr< safe::event_t< bool > > &shutdown_event) |
| Run the main event loop until Sunshine is asked to exit. | |
| template<class FN > | |
| void | on_signal (int sig, FN &&fn) |
| Register the handler invoked for a POSIX signal. | |
| void | on_signal_forwarder (int sig) |
| Forward a POSIX signal to the registered Sunshine handler. | |
| LRESULT CALLBACK | SessionMonitorWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
| Handle Windows session-change messages for the monitor window. | |
Variables | |
| std::map< std::string_view, std::function< int(const char *name, int argc, char **argv)> > | cmd_to_func |
| Cmd to func. | |
| std::map< int, std::function< void()> > | signal_handlers |
| Signal handlers. | |
| constexpr bool | tray_is_enabled = true |
| Compile-time flag indicating tray support is enabled. | |
Definitions for the main entry point for Sunshine.
| WINAPI BOOL ConsoleCtrlHandler | ( | DWORD | type | ) |
Handle Windows console control events for shutdown.
| type | Protocol, message, or resource type selector. |
| int main | ( | int | argc, |
| char * | argv[] ) |
Run the main application or worker loop.
Main application entry point.
| argc | The number of arguments. |
| argv | The arguments. |
| void mainThreadLoop | ( | const std::shared_ptr< safe::event_t< bool > > & | shutdown_event | ) |
Run the main event loop until Sunshine is asked to exit.
| shutdown_event | Shutdown event. |
| void on_signal | ( | int | sig, |
| FN && | fn ) |
Register the handler invoked for a POSIX signal.
| sig | Native signal number being handled. |
| fn | Signal handler function to install. |
| void on_signal_forwarder | ( | int | sig | ) |
Forward a POSIX signal to the registered Sunshine handler.
| sig | Native signal number being handled. |
| LRESULT CALLBACK SessionMonitorWindowProc | ( | HWND | hwnd, |
| UINT | uMsg, | ||
| WPARAM | wParam, | ||
| LPARAM | lParam ) |
Handle Windows session-change messages for the monitor window.
| hwnd | Window handle receiving the Windows control event. |
| uMsg | U msg. |
| wParam | W param. |
| lParam | L param. |
| std::map<std::string_view, std::function<int(const char *name, int argc, char **argv)> > cmd_to_func |
Cmd to func.