Addfile per drag and drop
https://git.do.srb2.org/SteelT/SRB2/-/commit/01cc2b91e189e4d268eddd38f3ba917133a07adc
This commit is contained in:
1 parent
acb5d96788
commit
09f79a6934
1 file changed
+6
@@ -969,6 +969,7 @@ static void Impl_HandleControllerButtonEvent(SDL_ControllerButtonEvent evt, Uint
|
||||
void I_GetEvent(void)
|
||||
{
|
||||
SDL_Event evt;
|
||||
char* dropped_filedir;
|
||||
// We only want the first motion event,
|
||||
// otherwise we'll end up catching the warp back to center.
|
||||
//int mouseMotionOnce = 0;
|
||||
@@ -1293,6 +1294,11 @@ void I_GetEvent(void)
|
||||
if (currentMenu == &OP_JoystickSetDef)
|
||||
M_SetupJoystickMenu(0);
|
||||
break;
|
||||
case SDL_DROPFILE:
|
||||
dropped_filedir = evt.drop.file;
|
||||
COM_BufInsertText(va("addfile \"%s\"", dropped_filedir));
|
||||
SDL_free(dropped_filedir); // Free dropped_filedir memory
|
||||
break;
|
||||
case SDL_QUIT:
|
||||
I_Quit();
|
||||
M_QuitResponse('y');
|
||||
|
||||
Reference in new issue
Block a user