Commit c4bf7f1c authored by Michal Novák's avatar Michal Novák
Browse files

feat(backend): added option to guessVideoChipsetManufacturer

parent b1886d0f
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -24,10 +24,12 @@ const extractNames = <T extends object, K extends keyof T>(
) => datasets.flatMap((ds) => ds.flatMap((data) => data[key]));

const guessVideoChipsetManufacturer = (chipset: string) => {
  switch (chipset.split(' ', 2)[0]) {
    case 'Radeon':
  switch (chipset.split(' ', 2)[0]?.toLowerCase()) {
    case 'radeon':
      return 'AMD';
    case 'GeForce':
    case 'geforce':
      return 'NVIDIA';
    case 'titan':
      return 'NVIDIA';
    default:
      throw Error(`Cannot guess video chipset manufacturer for '${chipset}'`);