diff --git a/src/engine/sys/sdl_glimp.cpp b/src/engine/sys/sdl_glimp.cpp index 6ac806b911..3060e26b6e 100644 --- a/src/engine/sys/sdl_glimp.cpp +++ b/src/engine/sys/sdl_glimp.cpp @@ -2231,3 +2231,23 @@ void GLimp_LogComment( const char *comment ) strlen( buf ), buf ); } } + +class SetWindowOriginCmd : public Cmd::StaticCmd +{ +public: + SetWindowOriginCmd() : StaticCmd("setWindowOrigin", "move the window") {} + + void Run( const Cmd::Args &args ) const + { + int x, y; + if ( args.Argc() != 3 + || !Str::ParseInt( x, args.Argv( 1 ) ) || !Str::ParseInt( y, args.Argv( 2 ) ) ) + { + Print( "Usage: setWindowOrigin " ); + return; + } + + SDL_SetWindowPosition( window, x, y ); + } +}; +static SetWindowOriginCmd setWindowOriginCmdRegistration;