modified src/main.cpp +6 -0
| @@ -49,6 +49,12 @@ void addGame(sqlite3* database, int id, std::string name, std::string path) { |
| 49 | 49 | execute_sql_command(database, command); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | +void removeGame(sqlite3* database, std::string name) { |
| 53 | + std::string command = "DELETE FROM GAME WHERE GAME_NAME="; |
| 54 | + command += "'" + name + "';"; |
| 55 | + execute_sql_command(database, command); |
| 56 | +} |
| 57 | + |
| 52 | 58 | void initialize_database(sqlite3* database) { |
| 53 | 59 | execute_sql_command(database, database_initialization_command); |
| 54 | 60 | addGame(database, 1, "Devastating Fog", ""); |
| @@ -49,6 +49,12 @@ void addGame(sqlite3* database, int id, std::string name, std::string path) { |
| 49 | execute_sql_command(database, command); | 49 | execute_sql_command(database, command); |
| 50 | } | 50 | } |
| 51 | | 51 | |
| | 52 | +void removeGame(sqlite3* database, std::string name) { |
| | 53 | + std::string command = "DELETE FROM GAME WHERE GAME_NAME="; |
| | 54 | + command += "'" + name + "';"; |
| | 55 | + execute_sql_command(database, command); |
| | 56 | +} |
| | 57 | + |
| 52 | void initialize_database(sqlite3* database) { | 58 | void initialize_database(sqlite3* database) { |
| 53 | execute_sql_command(database, database_initialization_command); | 59 | execute_sql_command(database, database_initialization_command); |
| 54 | addGame(database, 1, "Devastating Fog", ""); | 60 | addGame(database, 1, "Devastating Fog", ""); |