Use dropped item pos from SDL for native systems
This commit is contained in:
parent
e901ceec2b
commit
28b6c39fcb
1 changed files with 6 additions and 1 deletions
|
|
@ -346,8 +346,13 @@ void DrawingProgram::update() {
|
|||
void DrawingProgram::drag_drop_update() {
|
||||
if(controls.cursorHoveringOverCanvas) {
|
||||
for(auto& droppedItem : world.main.input.droppedItems) {
|
||||
if(droppedItem.isFile && std::filesystem::is_regular_file(droppedItem.droppedData))
|
||||
if(droppedItem.isFile && std::filesystem::is_regular_file(droppedItem.droppedData)) {
|
||||
#ifdef __EMSCRIPTEN_
|
||||
add_file_to_canvas_by_path(droppedItem.droppedData, world.main.input.mouse.pos, true);
|
||||
#else
|
||||
add_file_to_canvas_by_path(droppedItem.droppedData, droppedItem.pos, true);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue