@@ -59,13 +59,13 @@ class CommandLineParser : public QCommandLineParser
5959
6060 void showMessage (QString message, MessageType type) const
6161 {
62- #if defined(Q_OS_WIN32)
62+ #if defined(Q_OS_WIN32)
6363 UINT flags = MB_OK | MB_TOPMOST | MB_SETFOREGROUND ;
6464 flags |= (type == Info ? MB_ICONINFORMATION : MB_ICONERROR );
6565 QString title = " Moonlight" ;
6666 MessageBoxW (nullptr , reinterpret_cast <const wchar_t *>(message.utf16 ()),
6767 reinterpret_cast <const wchar_t *>(title.utf16 ()), flags);
68- #endif
68+ #endif
6969 message = message.endsWith (' \n ' ) ? message : message + ' \n ' ;
7070 fputs (qPrintable (message), type == Info ? stdout : stderr);
7171 }
@@ -170,7 +170,7 @@ GlobalCommandLineParser::ParseResult GlobalCommandLineParser::parse(const QStrin
170170 " pair Pair a new host\n "
171171 " \n "
172172 " See 'moonlight <action> --help' for help of specific action."
173- );
173+ );
174174 parser.addPositionalArgument (" action" , " Action to execute" , " <action>" );
175175 parser.parse (args);
176176 auto posArgs = parser.positionalArguments ();
@@ -221,7 +221,7 @@ void QuitCommandLineParser::parse(const QStringList &args)
221221 parser.setApplicationDescription (
222222 " \n "
223223 " Quit the currently running app on the given host."
224- );
224+ );
225225 parser.addPositionalArgument (" quit" , " quit running app" );
226226 parser.addPositionalArgument (" host" , " Host computer name, UUID, or IP address" , " <host>" );
227227
@@ -263,7 +263,7 @@ void PairCommandLineParser::parse(const QStringList &args)
263263 parser.setApplicationDescription (
264264 " \n "
265265 " Pair with the specified host."
266- );
266+ );
267267 parser.addPositionalArgument (" pair" , " pair host" );
268268 parser.addPositionalArgument (" host" , " Host computer name, UUID, or IP address" , " <host>" );
269269 parser.addValueOption (" pin" , " 4 digit pairing PIN" );
@@ -303,31 +303,31 @@ QString PairCommandLineParser::getPredefinedPin() const
303303StreamCommandLineParser::StreamCommandLineParser ()
304304{
305305 m_WindowModeMap = {
306- {" fullscreen" , StreamingPreferences::WM_FULLSCREEN },
307- {" windowed" , StreamingPreferences::WM_WINDOWED },
308- {" borderless" , StreamingPreferences::WM_FULLSCREEN_DESKTOP },
309- };
306+ {" fullscreen" , StreamingPreferences::WM_FULLSCREEN },
307+ {" windowed" , StreamingPreferences::WM_WINDOWED },
308+ {" borderless" , StreamingPreferences::WM_FULLSCREEN_DESKTOP },
309+ };
310310 m_AudioConfigMap = {
311- {" stereo" , StreamingPreferences::AC_STEREO },
312- {" 5.1-surround" , StreamingPreferences::AC_51_SURROUND },
313- {" 7.1-surround" , StreamingPreferences::AC_71_SURROUND },
314- };
311+ {" stereo" , StreamingPreferences::AC_STEREO },
312+ {" 5.1-surround" , StreamingPreferences::AC_51_SURROUND },
313+ {" 7.1-surround" , StreamingPreferences::AC_71_SURROUND },
314+ };
315315 m_VideoCodecMap = {
316- {" auto" , StreamingPreferences::VCC_AUTO },
317- {" H.264" , StreamingPreferences::VCC_FORCE_H264 },
318- {" HEVC" , StreamingPreferences::VCC_FORCE_HEVC },
319- {" AV1" , StreamingPreferences::VCC_FORCE_AV1 },
320- };
316+ {" auto" , StreamingPreferences::VCC_AUTO },
317+ {" H.264" , StreamingPreferences::VCC_FORCE_H264 },
318+ {" HEVC" , StreamingPreferences::VCC_FORCE_HEVC },
319+ {" AV1" , StreamingPreferences::VCC_FORCE_AV1 },
320+ };
321321 m_VideoDecoderMap = {
322- {" auto" , StreamingPreferences::VDS_AUTO },
323- {" software" , StreamingPreferences::VDS_FORCE_SOFTWARE },
324- {" hardware" , StreamingPreferences::VDS_FORCE_HARDWARE },
325- };
322+ {" auto" , StreamingPreferences::VDS_AUTO },
323+ {" software" , StreamingPreferences::VDS_FORCE_SOFTWARE },
324+ {" hardware" , StreamingPreferences::VDS_FORCE_HARDWARE },
325+ };
326326 m_CaptureSysKeysModeMap = {
327- {" never" , StreamingPreferences::CSK_OFF },
328- {" fullscreen" , StreamingPreferences::CSK_FULLSCREEN },
329- {" always" , StreamingPreferences::CSK_ALWAYS },
330- };
327+ {" never" , StreamingPreferences::CSK_OFF },
328+ {" fullscreen" , StreamingPreferences::CSK_FULLSCREEN },
329+ {" always" , StreamingPreferences::CSK_ALWAYS },
330+ };
331331}
332332
333333StreamCommandLineParser::~StreamCommandLineParser ()
@@ -341,7 +341,7 @@ void StreamCommandLineParser::parse(const QStringList &args, StreamingPreference
341341 parser.setApplicationDescription (
342342 " \n "
343343 " Starts directly streaming a given app."
344- );
344+ );
345345 parser.addPositionalArgument (" stream" , " Start stream" );
346346
347347 // Add other arguments and options
@@ -367,6 +367,7 @@ void StreamCommandLineParser::parse(const QStringList &args, StreamingPreference
367367 parser.addToggleOption (" game-optimization" , " game optimizations" );
368368 parser.addToggleOption (" audio-on-host" , " audio on host PC" );
369369 parser.addToggleOption (" frame-pacing" , " frame pacing" );
370+ parser.addToggleOption (" video-enhancement" , " Enhance video with AI" );
370371 parser.addToggleOption (" mute-on-focus-loss" , " mute audio when Moonlight window loses focus" );
371372 parser.addToggleOption (" background-gamepad" , " background gamepad input" );
372373 parser.addToggleOption (" reverse-scroll-direction" , " inverted scroll direction" );
@@ -474,6 +475,9 @@ void StreamCommandLineParser::parse(const QStringList &args, StreamingPreference
474475 // Resolve --frame-pacing and --no-frame-pacing options
475476 preferences->framePacing = parser.getToggleOptionValue (" frame-pacing" , preferences->framePacing );
476477
478+ // Resolve --video-enhancement and --no-video-enhancement options
479+ preferences->videoEnhancement = parser.getToggleOptionValue (" video-enhancement" , preferences->videoEnhancement );
480+
477481 // Resolve --mute-on-focus-loss and --no-mute-on-focus-loss options
478482 preferences->muteOnFocusLoss = parser.getToggleOptionValue (" mute-on-focus-loss" , preferences->muteOnFocusLoss );
479483
@@ -497,7 +501,7 @@ void StreamCommandLineParser::parse(const QStringList &args, StreamingPreference
497501
498502 // Resolve --yuv444 and --no-yuv444 options
499503 preferences->enableYUV444 = parser.getToggleOptionValue (" yuv444" , preferences->enableYUV444 );
500-
504+
501505 // Resolve --capture-system-keys option
502506 if (parser.isSet (" capture-system-keys" )) {
503507 preferences->captureSysKeysMode = mapValue (m_CaptureSysKeysModeMap, parser.getChoiceOptionValue (" capture-system-keys" ));
@@ -555,7 +559,7 @@ void ListCommandLineParser::parse(const QStringList &args)
555559 parser.setApplicationDescription (
556560 " \n "
557561 " List the available apps on the given host."
558- );
562+ );
559563 parser.addPositionalArgument (" list" , " list available apps" );
560564 parser.addPositionalArgument (" host" , " Host computer name, UUID, or IP address" , " <host>" );
561565
0 commit comments