Changeset 71763 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Apr 9, 2018 10:47:02 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 121865
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevSB16.cpp
r71762 r71763 1865 1865 #endif /* !VBOX_WITH_AUDIO_SB16_CALLBACKS */ 1866 1866 1867 static void sb16Save(PSSMHANDLE pSSM, PSB16STATE pThis) 1867 1868 /** 1869 * @callback_method_impl{FNSSMDEVLIVEEXEC} 1870 */ 1871 static DECLCALLBACK(int) sb16LiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass) 1872 { 1873 RT_NOREF(uPass); 1874 PSB16STATE pThis = PDMINS_2_DATA(pDevIns, PSB16STATE); 1875 1876 SSMR3PutS32(pSSM, pThis->irqCfg); 1877 SSMR3PutS32(pSSM, pThis->dmaCfg); 1878 SSMR3PutS32(pSSM, pThis->hdmaCfg); 1879 SSMR3PutS32(pSSM, pThis->portCfg); 1880 SSMR3PutS32(pSSM, pThis->verCfg); 1881 return VINF_SSM_DONT_CALL_AGAIN; 1882 } 1883 1884 /** 1885 * Worker for sb16SaveExec. 1886 */ 1887 static int sb16Save(PSSMHANDLE pSSM, PSB16STATE pThis) 1868 1888 { 1869 1889 SSMR3PutS32(pSSM, pThis->irq); … … 1903 1923 SSMR3PutS32(pSSM, pThis->csp_reg83w); 1904 1924 1905 SSMR3PutMem(pSSM, pThis->in2_data, sizeof 1906 SSMR3PutMem(pSSM, pThis->out_data, sizeof 1925 SSMR3PutMem(pSSM, pThis->in2_data, sizeof(pThis->in2_data)); 1926 SSMR3PutMem(pSSM, pThis->out_data, sizeof(pThis->out_data)); 1907 1927 SSMR3PutU8 (pSSM, pThis->test_reg); 1908 1928 SSMR3PutU8 (pSSM, pThis->last_read_byte); … … 1915 1935 1916 1936 SSMR3PutS32(pSSM, pThis->mixer_nreg); 1917 SSMR3PutMem(pSSM, pThis->mixer_regs, 256); 1918 1919 } 1920 1937 return SSMR3PutMem(pSSM, pThis->mixer_regs, 256); 1938 } 1939 1940 /** 1941 * @callback_method_impl{FNSSMDEVSAVEEXEC} 1942 */ 1943 static DECLCALLBACK(int) sb16SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM) 1944 { 1945 PSB16STATE pThis = PDMINS_2_DATA(pDevIns, PSB16STATE); 1946 1947 sb16LiveExec(pDevIns, pSSM, 0); 1948 return sb16Save(pSSM, pThis); 1949 } 1950 1951 /** 1952 * Worker for sb16LoadExec. 1953 */ 1921 1954 static int sb16Load(PSSMHANDLE pSSM, PSB16STATE pThis) 1922 1955 { … … 2022 2055 } 2023 2056 2024 static DECLCALLBACK(int) sb16LiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass) 2025 { 2026 RT_NOREF(uPass); 2027 PSB16STATE pThis = PDMINS_2_DATA(pDevIns, PSB16STATE); 2028 2029 SSMR3PutS32(pSSM, pThis->irqCfg); 2030 SSMR3PutS32(pSSM, pThis->dmaCfg); 2031 SSMR3PutS32(pSSM, pThis->hdmaCfg); 2032 SSMR3PutS32(pSSM, pThis->portCfg); 2033 SSMR3PutS32(pSSM, pThis->verCfg); 2034 return VINF_SSM_DONT_CALL_AGAIN; 2035 } 2036 2037 static DECLCALLBACK(int) sb16SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM) 2038 { 2039 PSB16STATE pThis = PDMINS_2_DATA(pDevIns, PSB16STATE); 2040 2041 sb16LiveExec(pDevIns, pSSM, 0); 2042 sb16Save(pSSM, pThis); 2043 return VINF_SUCCESS; 2044 } 2045 2057 /** 2058 * @callback_method_impl{FNSSMDEVLOADEXEC} 2059 */ 2046 2060 static DECLCALLBACK(int) sb16LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass) 2047 2061 { … … 2085 2099 return VINF_SUCCESS; 2086 2100 2087 sb16Load(pSSM, pThis); 2088 return VINF_SUCCESS; 2101 return sb16Load(pSSM, pThis); 2089 2102 } 2090 2103
Note:
See TracChangeset
for help on using the changeset viewer.