Update DB to version 12: Allow NULL gpu and add constant GPU vales (DB_NONE, DB_FRAMEBUFFER).

This commit is contained in:
2018-04-27 13:56:12 +01:00
parent 621477adff
commit d92ec59222
7 changed files with 328 additions and 35 deletions

View File

@@ -438,14 +438,14 @@ namespace Cicm.Database
Company = (int)dataRow["company"],
Year = (int)dataRow["year"],
Model = (string)dataRow["model"],
Cpu1 = (int)dataRow["cpu1"],
Mhz1 = float.Parse(dataRow["mhz1"].ToString()),
Cpu1 = dataRow["cpu1"] == DBNull.Value ? 0 : (int)dataRow["cpu1"],
Mhz1 = dataRow["mhz1"] == DBNull.Value ? 0 : float.Parse(dataRow["mhz1"].ToString()),
Cpu2 = dataRow["cpu2"] == DBNull.Value ? 0 : (int)dataRow["cpu2"],
Mhz2 = dataRow["mhz2"] == DBNull.Value ? 0 : float.Parse(dataRow["mhz2"].ToString()),
Bits = (int)dataRow["bits"],
Ram = (int)dataRow["ram"],
Rom = (int)dataRow["rom"],
Gpu = (int)dataRow["gpu"],
Gpu = dataRow["gpu"] == DBNull.Value ? 0 : (int)dataRow["gpu"],
Vram = (int)dataRow["vram"],
Colors = (int)dataRow["colors"],
Resolution = (string)dataRow["res"],