Subject | Hash | Author | Date (UTC) |
---|---|---|---|
Use scanf instead of fgets for interactive device selection. | fd7ff8b61ef1e21852d6c0a15ab0d17d09c5cccc | Jackalope | 2020-05-31 23:56:34 |
Include FreeType as system library to prevent warnings. | dc92c7f8acdaa90b25cf272f1730d338111780fc | Jackalope | 2020-05-31 23:54:37 |
Add glfw required version. 3.3.1 is not working. | ee727d7efda88af1e8a227b542f5b79d0ba6f301 | Jackalope | 2020-05-31 23:53:33 |
GCC Compatibility. | c828a38456627d0383d431165b802f97fd303349 | Jackalope | 2020-05-29 16:48:24 |
Solved clang compiler warnings from compute module. | b9416237761f8648bbddb7e7ba59e833a7879528 | Jackalope | 2020-05-28 11:09:55 |
CMake: two shaders targets, instead of single target per shader. | a708650319e44c7b98056f3bc85a896dd65d96f3 | Jackalope | 2020-05-28 11:06:13 |
Reduced amount of warnings. | 18bf33ca4e0e7f0369f6b5fdc59b81a8420dde8e | Jackalope | 2020-05-27 15:11:37 |
Replace jl::rarray with generic structure in shader header file. | 1cedb5886becc0f70c19d1c649e96f7eac5e0037 | Jackalope | 2020-05-27 13:07:31 |
Embedding shaders in obj library. | e877e7a688ee4a899480c12acba55c340622f993 | Jackalope | 2020-05-27 12:40:34 |
Update jlib 0.3.0 (refactoring of threads, new thread pool). | 1c713a320ced91d0ad5f1606c39f1187871d28e5 | Jackalope | 2020-05-26 14:44:35 |
Update graphics after change of "wait for monitor" flag. | 29d9b749c803646006b9b0071b54256bd3c08ca8 | Jackalope | 2020-05-26 14:40:34 |
reduced number of -Wno* warnings | bf3ec94ce3020715e246107a47efc9a8772db382 | Jackalope | 2020-05-25 01:48:40 |
Disable "find_package(jlib 0.2.0 REQUIRED)" in jrf | b4903e20d9128227163119fe73e32cda5050cb67 | Jackalope | 2020-05-24 16:40:26 |
Update jrf-0.2.1 | 3518adb37045d4e4eb4488c8c07e3f674f5fbac3 | Jackalope | 2020-05-24 14:33:14 |
Update jrf-0.2.0 | 8720e50ca5f692a96ba764cab1a250683c6a0c59 | Jackalope | 2020-05-24 13:42:55 |
Update jlib-0.2.0 | 98c73665c12797a530d12e34dc764e72a8767ad1 | Jackalope | 2020-05-24 00:32:02 |
Mistake in CMake option | 112275a2e0bc8619612ab49d808daeeeb599b8de | Jackalope | 2020-05-24 00:11:04 |
Device selection settings: 1. First suitable. 2. User can select with stdin/stdout. 3. User function callback. | adcfd55f60dfc6eea019f083019012a0b4aa8f02 | Jackalope | 2020-05-23 13:52:07 |
ModuleGraphics: fix for mip level computation was wrong because depth is ignored. | 834ceab8e0ea99b6b8c25928c9f3be968679cff3 | Jackalope | 2020-05-21 11:57:26 |
Compute module. Image copy staging buffer size limit problem fixed by representing row image memory in staging buffer. | 740d8bf1d12352b08da05a63957afcb508ea6fd5 | Jackalope | 2020-05-21 11:55:31 |
File | Lines added | Lines deleted |
---|---|---|
src/device/device.cpp | 17 | 18 |
File src/device/device.cpp changed (mode: 100644) (index 884317b..ef3bb7e) | |||
... | ... | device_agreement(const VkPhysicalDeviceProperties *p_props, uint32_t *p_indices, | |
205 | 205 | printf("|*| Device №%u:\n", i); | printf("|*| Device №%u:\n", i); |
206 | 206 | print_device(p_props[p_indices[i]]); | print_device(p_props[p_indices[i]]); |
207 | 207 | } | } |
208 | for (;;) { | ||
208 | jfs::stream stream(stdin); | ||
209 | for (;; stream.discard_input()) { | ||
210 | if (jfs::error_no()) { | ||
211 | puts(jfs::error_str()); | ||
212 | return vkw::ERROR_FILE_READING; | ||
213 | } | ||
209 | 214 | printf("Device index (-1 to cancel): "); | printf("Device index (-1 to cancel): "); |
210 | char line[LINE_MAX]; | ||
211 | if (fgets(line, LINE_MAX, stdin) != nullptr) { | ||
212 | int32_t input = -2; | ||
213 | std::from_chars(line, line + strlen(line), input); | ||
214 | if (input >= int32_t(count)) { | ||
215 | printf("There is no device with №%i, please try again.\n", input); | ||
216 | continue; | ||
217 | } | ||
218 | if (input < -1) { | ||
219 | puts("Unrecognized input, please try again."); | ||
220 | continue; | ||
221 | } | ||
222 | *p_dst = input; | ||
223 | return VK_SUCCESS; | ||
215 | int32_t input = -2; | ||
216 | if (scanf("%i", &input) != 1) | ||
217 | continue; | ||
218 | if (input >= int32_t(count)) { | ||
219 | printf("There is no device with №%i, please try again.\n", input); | ||
220 | continue; | ||
224 | 221 | } | } |
225 | else { | ||
226 | printf("\n%s\n", jfs::error_str()); | ||
227 | return vkw::ERROR_FILE_READING; | ||
222 | if (input < -1) { | ||
223 | puts("Unrecognized input, please try again."); | ||
224 | continue; | ||
228 | 225 | } | } |
226 | *p_dst = input; | ||
227 | return VK_SUCCESS; | ||
229 | 228 | } | } |
230 | 229 | } | } |
231 | 230 | } | } |