You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on my C-GameEngine on Windows 11 and I use Cmder as my working terminal and I compile with plain clang (no IDE). When I use any other native windows terminal (CMD or PowerShell) both support SDL2 Drop events, such as DropBegin, DropComplete, DropFile and DropText, but with Cmder those events are simply not working, they are not even poll at all, it is like they do not exist for Cmder. If I simply run my program by double clicking they work as expected, it is just by running the program on Cmder.
It can be reproduced with the simple example of the wiki, here it is:
#include "SDL.h"
int main(int argc, char *argv[]) {
SDL_bool done;
SDL_Window *window;
SDL_Event event; // Declare event handle
char* dropped_filedir; // Pointer for directory of dropped file
SDL_Init(SDL_INIT_VIDEO); // SDL2 initialization
window = SDL_CreateWindow( // Create a window
"SDL_DropEvent usage, please drop the file on window",
SDL_WINDOWPOS_CENTERED,
SDL_WINDOWPOS_CENTERED,
640,
480,
SDL_WINDOW_OPENGL
);
// Check that the window was successfully made
if (window == NULL) {
// In the event that the window could not be made...
SDL_Log("Could not create window: %s", SDL_GetError());
SDL_Quit();
return 1;
}
SDL_EventState(SDL_DROPFILE, SDL_ENABLE);
done = SDL_FALSE;
while (!done) { // Program loop
while (!done && SDL_PollEvent(&event)) {
switch (event.type) {
case (SDL_QUIT): { // In case of exit
done = SDL_TRUE;
break;
}
case (SDL_DROPFILE): { // In case if dropped file
dropped_filedir = event.drop.file;
// Shows directory of dropped file
SDL_ShowSimpleMessageBox(
SDL_MESSAGEBOX_INFORMATION,
"File dropped on window",
dropped_filedir,
window
);
SDL_free(dropped_filedir); // Free dropped_filedir memory
break;
}
}
}
SDL_Delay(0);
}
SDL_DestroyWindow(window); // Close and destroy the window
SDL_Quit(); // Clean up
return 0;
}
Just compile that program and see how it behaves in from the terminal and just from double clicking. Is this a known error? I could not find that much information about this problem. If anyone knows something on why this is happening or how to fix it, let me know pls!
Run the generated program with Cmder (do not work), then run it by double click on the file explorer (works) and also on other terminal (like CMD, and it works)
Additional context
No response
Checklist
I have read the documentation.
I have searched for similar issues and found none that describe my issue.
I have reproduced the issue on the latest version of Cmder.
I am certain my issues are not related to ConEmu, Clink, or other third-party tools that Cmder uses.
The text was updated successfully, but these errors were encountered:
Terminals show output from programs and accept input and pass the input to programs.
CMD and Powershell are shell programs, not terminals.
ConEmu and Windows Terminal are terminals. When no terminal program is launched, then the default terminal is launched. On older versions of Windows it's the legacy conhost terminal, and on newer versions it's Windows Terminal.
Cmder is a package that bundles some scripts and the ConEmu terminal.
Try posting the question in the ConEmu repo. Cmder doesn't own or modify the ConEmu terminal.
Also, it may be an issue in the SDL code, so posting the question to the SDL maintainers could also be useful.
Version Information
Cmder Edition
Cmder Full (with Git)
Description of the issue
I'm working on my C-GameEngine on Windows 11 and I use Cmder as my working terminal and I compile with plain clang (no IDE). When I use any other native windows terminal (CMD or PowerShell) both support SDL2 Drop events, such as DropBegin, DropComplete, DropFile and DropText, but with Cmder those events are simply not working, they are not even poll at all, it is like they do not exist for Cmder. If I simply run my program by double clicking they work as expected, it is just by running the program on Cmder.
It can be reproduced with the simple example of the wiki, here it is:
Just compile that program and see how it behaves in from the terminal and just from double clicking. Is this a known error? I could not find that much information about this problem. If anyone knows something on why this is happening or how to fix it, let me know pls!
Thank you so much in advance.
How to reproduce
clang -g -O0 main.cpp -I path/to/sdl2/include -L path/to/sdl/lib -lSDL2main -lSDL2 -lwinmm -lgdi32 -Xlinker /subsystem:console -lShell32 -o main.exe
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: