Return: Flag that indicates whether the function was succesful or not.
| 613 | |
| 614 | //Return: Flag that indicates whether the function was succesful or not. |
| 615 | bool FCEUI_Initialize() { |
| 616 | srand(time(0)); |
| 617 | |
| 618 | if (!FCEU_InitVirtualVideo()) { |
| 619 | return false; |
| 620 | } |
| 621 | |
| 622 | AllocBuffers(); |
| 623 | |
| 624 | // Initialize some parts of the settings structure |
| 625 | //mbg 5/7/08 - I changed the ntsc settings to match pal. |
| 626 | //this is more for precision emulation, instead of entertainment, which is what fceux is all about nowadays |
| 627 | memset(&FSettings, 0, sizeof(FSettings)); |
| 628 | //FSettings.UsrFirstSLine[0]=8; |
| 629 | FSettings.UsrFirstSLine[0] = 0; |
| 630 | FSettings.UsrFirstSLine[1] = 0; |
| 631 | //FSettings.UsrLastSLine[0]=231; |
| 632 | FSettings.UsrLastSLine[0] = 239; |
| 633 | FSettings.UsrLastSLine[1] = 239; |
| 634 | FSettings.SoundVolume = 150; //0-150 scale |
| 635 | FSettings.TriangleVolume = 256; //0-256 scale (256 is max volume) |
| 636 | FSettings.Square1Volume = 256; //0-256 scale (256 is max volume) |
| 637 | FSettings.Square2Volume = 256; //0-256 scale (256 is max volume) |
| 638 | FSettings.NoiseVolume = 256; //0-256 scale (256 is max volume) |
| 639 | FSettings.PCMVolume = 256; //0-256 scale (256 is max volume) |
| 640 | |
| 641 | FCEUPPU_Init(); |
| 642 | |
| 643 | X6502_Init(); |
| 644 | |
| 645 | return true; |
| 646 | } |
| 647 | |
| 648 | void FCEUI_Kill(void) { |
| 649 | #ifdef _S9XLUA_H |
no test coverage detected