Relative Content

Tag Archive for c++openglsdlgame-development

Drag and drop feature on SDL2

i want to be able to drag an image file, drop it on the window and have it rendered exactly where the cursor is. problem is, SDL_GetMouseState() stops recording mouse events when I’m dragging the desired file, so it gets rendered on the last recorded cursor position (which is on the edge my cursor went out the window of to fetch the file). is using the Windows API the only solution ? i’d rather not deal with OS compatibility issues right now.