Mercurial > msvpvf
comparison src/gui.c @ 25:eb15d8595e8c
moar backports!
| author | Paper <37962225+mrpapersonic@users.noreply.github.com> |
|---|---|
| date | Thu, 07 Apr 2022 19:46:17 -0400 |
| parents | 348a4a4beb17 |
| children | 0d19cff70e93 |
comparison
equal
deleted
inserted
replaced
| 24:348a4a4beb17 | 25:eb15d8595e8c |
|---|---|
| 126 ofn.hwndOwner = hWnd; | 126 ofn.hwndOwner = hWnd; |
| 127 ofn.lpstrFile = output_file; | 127 ofn.lpstrFile = output_file; |
| 128 ofn.lpstrFile[0] = '\0'; | 128 ofn.lpstrFile[0] = '\0'; |
| 129 ofn.nMaxFile = 256; | 129 ofn.nMaxFile = 256; |
| 130 ofn.lpstrFilter = "Movie Studio project files\0*.vf\0VEGAS Pro project files\0*.veg\0All files\0*.*\0"; | 130 ofn.lpstrFilter = "Movie Studio project files\0*.vf\0VEGAS Pro project files\0*.veg\0All files\0*.*\0"; |
| 131 ofn.nFilterIndex = type+1; | 131 ofn.nFilterIndex = (int)type+1; |
| 132 | 132 |
| 133 GetSaveFileName(&ofn); | 133 GetSaveFileName(&ofn); |
| 134 | 134 |
| 135 copy_file(input_file, output_file); | 135 copy_file(input_file, output_file); |
| 136 FILE* output = fopen(output_file, "r+b"); | 136 FILE* output = fopen(output_file, "r+b"); |
| 137 if (output == NULL) { | 137 if (output == NULL) { |
| 138 MessageBoxW(hWnd, L"Failed to save project file!", L"Saving project failed!", MB_ICONEXCLAMATION); | 138 MessageBoxW(hWnd, L"Failed to save project file!", L"Saving project failed!", MB_ICONEXCLAMATION); |
| 139 return; | 139 return; |
| 140 } | 140 } |
| 141 | 141 |
| 142 switch (type) { | 142 switch ((int)type) { |
| 143 case vf: | 143 case vf: { |
| 144 unsigned char magic[] = {0xEF, 0x29, 0xC4, 0x46, 0x4A, 0x90, 0xD2, 0x11, | 144 unsigned char magic[] = {0xEF, 0x29, 0xC4, 0x46, 0x4A, 0x90, 0xD2, 0x11, |
| 145 0x87, 0x22, 0x00, 0xC0, 0x4F, 0x8E, 0xDB, 0x8A}; | 145 0x87, 0x22, 0x00, 0xC0, 0x4F, 0x8E, 0xDB, 0x8A}; |
| 146 set_data(magic, version, output); | 146 set_data(magic, version, output); |
| 147 break; | 147 break; |
| 148 default: | 148 } |
| 149 default: { | |
| 149 unsigned char magic[] = {0xF6, 0x1B, 0x3C, 0x53, 0x35, 0xD6, 0xF3, 0x43, | 150 unsigned char magic[] = {0xF6, 0x1B, 0x3C, 0x53, 0x35, 0xD6, 0xF3, 0x43, |
| 150 0x8A, 0x90, 0x64, 0xB8, 0x87, 0x23, 0x1F, 0x7F}; | 151 0x8A, 0x90, 0x64, 0xB8, 0x87, 0x23, 0x1F, 0x7F}; |
| 151 set_data(magic, version, output); | 152 set_data(magic, version, output); |
| 152 break; | 153 break; |
| 154 } | |
| 153 } | 155 } |
| 154 | 156 |
| 155 fclose(output); | 157 fclose(output); |
| 156 } | 158 } |
| 157 | 159 |
