@@ -105,7 +105,7 @@ void drop_callback(GLFWwindow *window, int count, const char **paths)
105
105
}
106
106
107
107
/*Rectangle to hold file names*/
108
- //void draw_file_rectangle_widget(struct nk_context *ctx, struct nk_font *font)
108
+ // void draw_file_rectangle_widget(struct nk_context *ctx, struct nk_font *font)
109
109
//{
110
110
// struct nk_command_buffer *canvas;
111
111
// struct nk_input *input = &ctx->input;
@@ -132,10 +132,10 @@ void drop_callback(GLFWwindow *window, int count, const char **paths)
132
132
// }
133
133
// }
134
134
//
135
- //}
135
+ // }
136
136
137
137
/*Rectangle to hold extraction info*/
138
- //void draw_info_rectangle_widget(struct nk_context *ctx, struct nk_font *font)
138
+ // void draw_info_rectangle_widget(struct nk_context *ctx, struct nk_font *font)
139
139
//{
140
140
// struct nk_command_buffer *canvas;
141
141
// struct nk_input *input = &ctx->input;
@@ -157,18 +157,18 @@ void drop_callback(GLFWwindow *window, int count, const char **paths)
157
157
// nk_draw_text(canvas, space, "Output Path: Default", 20, &font->handle, nk_rgb(88, 81, 96), nk_rgb(0, 0, 0));
158
158
// space.y = space.y + 20;
159
159
// nk_draw_text(canvas, space, "Hardsubs Extraction: Yes", 24, &font->handle, nk_rgb(88, 81, 96), nk_rgb(0, 0, 0));
160
- //}
160
+ // }
161
161
162
162
int main (void )
163
163
{
164
164
165
- //Platform
165
+ // Platform
166
166
static GLFWwindow * win ;
167
167
struct nk_context * ctx ;
168
168
int screenWidth , screenHeight ;
169
- //int winWidth, winHeight;
169
+ // int winWidth, winHeight;
170
170
171
- //GLFW
171
+ // GLFW
172
172
glfwSetErrorCallback (error_callback );
173
173
if (!glfwInit ())
174
174
{
@@ -188,7 +188,7 @@ int main(void)
188
188
exit (1 );
189
189
}
190
190
191
- //GUI
191
+ // GUI
192
192
193
193
struct file_browser browser ;
194
194
static const struct file_browser reset_browser ;
@@ -203,7 +203,7 @@ int main(void)
203
203
nk_glfw3_font_stash_end ();
204
204
nk_style_set_font (ctx , & droid -> handle );
205
205
206
- //CHECKBOX VALUES
206
+ // CHECKBOX VALUES
207
207
static int show_terminal_check = nk_false ;
208
208
static int show_preview_check = nk_false ;
209
209
static int show_activity_check = nk_false ;
@@ -273,21 +273,21 @@ int main(void)
273
273
fclose (saveFile );
274
274
break ;
275
275
}
276
- //Input
276
+ // Input
277
277
glfwPollEvents ();
278
278
nk_glfw3_new_frame ();
279
279
280
- //Popups
280
+ // Popups
281
281
static int show_progress_details = nk_false ;
282
282
static int show_about_ccx = nk_false ;
283
283
static int show_getting_started = nk_false ;
284
284
285
- //GUI
285
+ // GUI
286
286
if (nk_begin (ctx , "CCExtractor" , nk_rect (0 , 0 , WIDTH_mainPanelAndWindow , HEIGHT_mainPanelandWindow ),
287
287
NK_WINDOW_NO_SCROLLBAR | NK_WINDOW_BACKGROUND ))
288
288
{
289
289
290
- //MENUBAR
290
+ // MENUBAR
291
291
nk_menubar_begin (ctx );
292
292
nk_layout_row_begin (ctx , NK_STATIC , 30 , 3 );
293
293
nk_layout_row_push (ctx , 80 );
@@ -332,23 +332,23 @@ int main(void)
332
332
nk_menu_end (ctx );
333
333
}
334
334
335
- //Network Settings
335
+ // Network Settings
336
336
if (network_settings .show_network_settings )
337
337
draw_network_popup (ctx , & network_settings );
338
338
339
- //About CCExtractor Popup
339
+ // About CCExtractor Popup
340
340
if (show_about_ccx )
341
341
draw_about_ccx_popup (ctx , & show_about_ccx , & droid_big -> handle , & droid_head -> handle );
342
342
343
- //Getting Started
343
+ // Getting Started
344
344
if (show_getting_started )
345
345
draw_getting_started_popup (ctx , & show_getting_started );
346
346
347
- //Color Popup
347
+ // Color Popup
348
348
if (output .color_popup )
349
349
draw_color_popup (ctx , & output );
350
350
351
- //File Browser as Popup
351
+ // File Browser as Popup
352
352
if (main_settings .scaleWindowForFileBrowser )
353
353
{
354
354
int width = 0 , height = 0 ;
@@ -358,11 +358,11 @@ int main(void)
358
358
file_browser_run (& browser , ctx , & main_settings , & output , & debug , & hd_homerun );
359
359
}
360
360
361
- //Thread popop when file can't be read
361
+ // Thread popop when file can't be read
362
362
if (main_settings .threadPopup )
363
363
draw_thread_popup (ctx , & main_settings .threadPopup );
364
364
365
- //Thread popup for hd_homerun thread
365
+ // Thread popup for hd_homerun thread
366
366
if (hd_homerun .threadPopup )
367
367
draw_thread_popup (ctx , & hd_homerun .threadPopup );
368
368
@@ -463,25 +463,25 @@ int main(void)
463
463
nk_style_pop_vec2 (ctx );
464
464
}
465
465
466
- //ADVANCED MODE FLAG
466
+ // ADVANCED MODE FLAG
467
467
static const float ratio_adv_mode [] = {0.75f , 0.22f , .03f };
468
468
nk_layout_row (ctx , NK_DYNAMIC , 20 , 3 , ratio_adv_mode );
469
469
nk_spacing (ctx , 1 );
470
470
nk_checkbox_label (ctx , "Advanced Mode" , & advanced_mode_check );
471
471
472
- //RADIO BUTTON 1
472
+ // RADIO BUTTON 1
473
473
static const float ratio_button [] = {.10f , .90f };
474
474
static const float check_extension_ratio [] = {.10f , .53f , .12f , .15f , .10f };
475
- //static int op = FILES;
475
+ // static int op = FILES;
476
476
nk_layout_row (ctx , NK_DYNAMIC , 20 , 2 , ratio_button );
477
477
nk_spacing (ctx , 1 );
478
478
if (nk_option_label (ctx , "Extract from files below:" , main_settings .port_or_files == FILES ))
479
479
{
480
- //op = FILES;
480
+ // op = FILES;
481
481
main_settings .port_or_files = FILES ;
482
482
}
483
483
484
- //CHECKBOX FOR FILE TYPES
484
+ // CHECKBOX FOR FILE TYPES
485
485
static int add_remove_button = nk_false ;
486
486
nk_layout_row (ctx , NK_DYNAMIC , 20 , 5 , check_extension_ratio );
487
487
nk_spacing (ctx , 1 );
@@ -525,7 +525,7 @@ int main(void)
525
525
}
526
526
}
527
527
528
- //RECTANGLE-FILES
528
+ // RECTANGLE-FILES
529
529
static const float ratio_rect_files [] = {0.10f , 0.80f };
530
530
nk_layout_row (ctx , NK_DYNAMIC , 180 , 2 , ratio_rect_files );
531
531
nk_spacing (ctx , 1 );
@@ -559,31 +559,31 @@ int main(void)
559
559
nk_group_end (ctx );
560
560
}
561
561
562
- //RadioButton 2 along with combobox
562
+ // RadioButton 2 along with combobox
563
563
static const float ratio_port [] = {0.10f , 0.20f , 0.20f , 0.20f , 0.20f , 0.10f };
564
564
nk_layout_row (ctx , NK_DYNAMIC , 20 , 6 , ratio_port );
565
565
nk_spacing (ctx , 1 );
566
566
if (nk_option_label (ctx , "Extract from" , main_settings .port_or_files == PORT ))
567
567
{
568
- //op = PORT;
568
+ // op = PORT;
569
569
main_settings .port_or_files = PORT ;
570
570
}
571
571
main_settings .port_select = nk_combo (ctx , main_settings .port_type , 2 , main_settings .port_select , 20 , nk_vec2 (85 , 100 ));
572
572
nk_label (ctx , " stream, on port:" , NK_TEXT_LEFT );
573
573
574
- //RADDIO BUTTON 2, TEXTEDIT FOR ENTERING PORT NUMBER
574
+ // RADDIO BUTTON 2, TEXTEDIT FOR ENTERING PORT NUMBER
575
575
576
576
static int len ;
577
577
static char buffer [10 ];
578
578
nk_edit_string (ctx , NK_EDIT_SIMPLE , main_settings .port_num , & main_settings .port_num_len , 8 , nk_filter_decimal );
579
579
nk_layout_space_begin (ctx , NK_STATIC , 10 , 1 );
580
580
nk_layout_space_end (ctx );
581
581
582
- //Extraction Information
582
+ // Extraction Information
583
583
nk_layout_row_dynamic (ctx , 10 , 1 );
584
584
nk_text (ctx , "Extraction Info:" , 16 , NK_TEXT_CENTERED );
585
585
586
- //RECTANGLE-INFO
586
+ // RECTANGLE-INFO
587
587
static const float ratio_rect_info [] = {0.10f , 0.80f , 0.10f };
588
588
nk_layout_row (ctx , NK_DYNAMIC , 75 , 2 , ratio_rect_info );
589
589
nk_spacing (ctx , 1 );
@@ -608,14 +608,14 @@ int main(void)
608
608
609
609
nk_layout_space_begin (ctx , NK_STATIC , 10 , 1 );
610
610
nk_layout_space_end (ctx );
611
- //PROGRESSBAR
611
+ // PROGRESSBAR
612
612
static const float ratio_progress [] = {0.10f , 0.03f , 0.57f , 0.03f , 0.17f , 0.10f };
613
613
nk_layout_row (ctx , NK_DYNAMIC , 20 , 6 , ratio_progress );
614
614
nk_spacing (ctx , 1 );
615
615
nk_spacing (ctx , 1 );
616
616
nk_progress (ctx , & main_settings .progress_cursor , 101 , nk_false );
617
617
618
- //Extract Button
618
+ // Extract Button
619
619
nk_spacing (ctx , 1 );
620
620
if (nk_button_label (ctx , "Extract" ))
621
621
{
@@ -626,7 +626,7 @@ int main(void)
626
626
nk_layout_space_begin (ctx , NK_STATIC , 10 , 1 );
627
627
nk_layout_space_end (ctx );
628
628
629
- //PROGRESS_DETAILS_BUTTON
629
+ // PROGRESS_DETAILS_BUTTON
630
630
if (!show_activity_check )
631
631
{
632
632
nk_layout_row_dynamic (ctx , 20 , 3 );
@@ -638,11 +638,11 @@ int main(void)
638
638
nk_spacing (ctx , 1 );
639
639
}
640
640
641
- //PROGRESS_DETAILS_POPUP
641
+ // PROGRESS_DETAILS_POPUP
642
642
if (show_progress_details )
643
643
draw_progress_details_popup (ctx , & show_progress_details , & main_settings );
644
644
645
- //build command string
645
+ // build command string
646
646
command_builder (& command , & main_settings , & network_settings , & input , & advanced_input , & output , & decoders , & credits , & debug , & burned_subs );
647
647
}
648
648
nk_end (ctx );
@@ -735,9 +735,9 @@ int main(void)
735
735
glViewport (0 , 0 , screenWidth , screenHeight );
736
736
glClear (GL_COLOR_BUFFER_BIT );
737
737
/* IMPORTANT: `nk_glfw_render` modifies some global OpenGL state
738
- * with blending, scissor, face culling and depth test and defaults everything
739
- * back into a default state. Make sure to either save and restore or
740
- * reset your own state after drawing rendering the UI. */
738
+ * with blending, scissor, face culling and depth test and defaults everything
739
+ * back into a default state. Make sure to either save and restore or
740
+ * reset your own state after drawing rendering the UI. */
741
741
nk_glfw3_render (NK_ANTI_ALIASING_ON );
742
742
glfwSwapBuffers (win );
743
743
}
@@ -757,7 +757,7 @@ int main(void)
757
757
glDeleteTextures (1 , (const GLuint * )& media .icons .movie_file .handle .id );
758
758
759
759
file_browser_free (& browser );
760
- //free(main_settings.filenames);
760
+ // free(main_settings.filenames);
761
761
762
762
nk_glfw3_shutdown ();
763
763
glfwTerminate ();
@@ -786,7 +786,7 @@ char *truncate_path_string(char *filePath)
786
786
char * file_path = strdup (filePath );
787
787
int i , j , z , slash_length , fileNameTruncated_index , copycount , prefix_length ;
788
788
char file_name [PATH_LENGTH ], * ptr_slash , fileNameTruncated [NAME_LENGTH ];
789
- //strcpy(filePath[i], paths[i]);
789
+ // strcpy(filePath[i], paths[i]);
790
790
if (strlen (filePath ) >= PATH_LENGTH - 1 )
791
791
{
792
792
#ifdef _WIN32
@@ -847,10 +847,10 @@ char *truncate_path_string(char *filePath)
847
847
848
848
void remove_path_entry (struct main_tab * main_settings , int indexToRemove )
849
849
{
850
- //printf("Beginning processing. Array is currently: ");
851
- //for (int i = 0; i < arraySize; ++i)
850
+ // printf("Beginning processing. Array is currently: ");
851
+ // for (int i = 0; i < arraySize; ++i)
852
852
// printf("%d ", (*array)[i]);
853
- //printf("\n");
853
+ // printf("\n");
854
854
855
855
char * * temp = (char * * )calloc (main_settings -> filename_count , sizeof (char * )); // allocate an array with a size 1 less than the current one
856
856
0 commit comments