From d858c528bac58917df0ba3930a53fbc144d8fcf8 Mon Sep 17 00:00:00 2001 From: homayk228 <43516026+SouceCalve@users.noreply.github.com> Date: Sun, 31 Aug 2025 14:33:04 +0700 Subject: [PATCH] Fixed starting crash --- .gitignore | 2 ++ .vscode/launch.json | 34 ++++++++++++++++++++++++++++++++++ CMakeLists.txt | 2 +- Mouse.cpp | 5 ++++- Mouse.h | 3 ++- 5 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 .vscode/launch.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e464c60 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +/build diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..a0d6c6d --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,34 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "cmake", + "request": "launch", + "name": "CMake: Configure project", + "cmakeDebugType": "configure", + "clean": true, + "configureAll": false + }, + { + "name": "C/C++ Debug (gdb Launch)", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/build/bloody", + "args": [], + "stopAtEntry": true, + "cwd": "${workspaceFolder}", + "environment": [], + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + } + ] +} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 0513ae1..ed58530 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(bloody) find_package(PkgConfig REQUIRED) diff --git a/Mouse.cpp b/Mouse.cpp index 18e1fa7..016f140 100644 --- a/Mouse.cpp +++ b/Mouse.cpp @@ -137,7 +137,7 @@ int Mouse::readFromMouse(uint8_t *request, size_t requestSize, uint8_t *response cout<<"Unnable to receive data"<